Knowledge intensive data management system for business process and case management

ABSTRACT

Data can be categorized into facts, information, hypothesis, and directives. Activities that generate certain categories of data based on other categories of data through the application of knowledge which can be categorized into classifications, assessments, resolutions, and enactments. Activities can be driven by a Classification-Assessment-Resolution-Enactment (CARE) control engine. The CARE control and these categorizations can be used to enhance a multitude of systems, for example diagnostic system, such as through historical record keeping, machine learning, and automation. Such a diagnostic system can include a system that forecasts computing system failures based on the application of knowledge to system vital signs such as thread or stack segment intensity and memory heap usage. These vital signs are facts that can be classified to produce information such as memory leaks, convoy effects, or other problems. Classification can involve the automatic generation of classes, states, observations, predictions, norms, objectives, and the processing of sample intervals having irregular durations.

CLAIM OF PRIORITY

The present application claims priority under 35 U.S.C. §119(e) to U.S.Provisional Patent Application Ser. No. 61/885,424, filed Oct. 1, 2013,and titled “DATA DRIVEN BUSINESS PROCESS AND CASE MANAGEMENT”, thecontents of which are incorporated by reference herein. The presentapplication also claims priority under 35 U.S.C. §119(e) to U.S.Provisional Patent Application Ser. No. 61/811,102, filed Apr. 11, 2013,and titled “SEASONAL TRENDING, FORECASTING, ANOMALY DETECTION, ANDENDPOINT PREDICTION OF JAVA HEAP USAGE”, the contents of which areincorporated by reference herein; and U.S. Provisional PatentApplication Ser. No. 61/811,106, filed Apr. 11, 2013, and titled“PREDICTIVE DIAGNOSIS OF SLA VIOLATIONS IN CLOUD SERVICES BY SEASONALTRENDING AND FORECASTING WITH THREAD INTENSITY ANALYTICS”, the contentsof which are incorporated by reference herein.

BACKGROUND

Individuals and organizations are faced with rapidly increasing amountsof data. Such data may rapidly increase in complexity and urgency. Theindividuals and organizations often need to analyze these data in orderto act upon the data in an appropriate and a timely manner. In somedomains, the actions that the individuals and organizations take aregoverned by regulations that also tend to become increasingly complex.For example, regulations might require the maintenance of meticuloushistorical records that are susceptible to auditing in the event thatsome problem should occur. Alternatively, the service level agreement(SLA) entered into between business organizations might require thatdata be analyzed systematically and actionable information in the databe acted upon proactively to avoid SLA violations and also to determinewhether the agreement is being satisfied. Following the regulations,service level agreements, and other requirements can be very burdensome,and can grow more burdensome with the passage of time.

Because regulatory and SLA requirements have become so vastly complex,computer software lends itself to assisting individuals andorganizations in their efforts to comply with the requirements. However,inasmuch as the regulations and SLAs tend to evolve, the computersoftware itself is tasked with evolving in step to keep up.Unfortunately, the customary process used for developing and updatingcomputer software is slow and cumbersome. Software development cyclesare usually long. These difficulties plaguing the evolution of computersoftware can be partially attributed to the fact that data are oftenhidden in the procedural software code. Data are often separated fromthe knowledge that can be applied to that data.

BRIEF DESCRIPTION OF DRAWINGS

FIGS. 1A-B show a flow diagram that illustrates an example of atechnique for applying thread or stack segment intensity analytics,according to an embodiment of the invention.

FIGS. 2A-B show a flow diagram that illustrates an example of atechnique for updating stack frame statistics, according to anembodiment of the invention.

FIGS. 3A-J show a flow diagram that illustrates an example of atechnique for classifying threads and the stack segments of thosethreads, according to an embodiment of the invention.

FIG. 4 is a flow diagram that illustrates an example of a technique forapplying a seasonal trend filter, according to an embodiment of theinvention.

FIGS. 5A-C show a flow diagram that illustrates an example of atechnique for splitting a stack segment at a branch point before orafter a stack frame, according to an embodiment of the invention.

FIGS. 6A-E show a flow diagram that illustrates an example of atechnique for coalescing the stack segments of a thread, according to anembodiment of the invention.

FIGS. 7A-B show a flow diagram that illustrates an example of atechnique for registering a thread classification item for a specifiedstack trace and a specified set of coalesced segments, according to anembodiment of the invention.

FIG. 8 is a flow diagram that illustrates an example of a technique forupdating thread classification statistics for a specified threadclassification information item, according to an embodiment of theinvention.

FIG. 9 is a flow diagram that illustrates an example of a technique forupdating stack segment statistics for a specified segment informationitem, according to an embodiment of the invention.

FIG. 10 is a simplified block diagram illustrating components of asystem environment that may be used in accordance with an embodiment ofthe present invention.

FIG. 11 is a simplified block diagram of a computer system that may beused in accordance with embodiments of the present invention.

FIG. 12 is a block diagram of a framework that transforms various statesof data using various functions, according to an embodiment of theinvention.

FIG. 13 is a diagram that shows a trend, according to an embodiment ofthe invention.

FIG. 14 is a diagram that shows an example of a set of data points thathave been automatically classified, according to an embodiment of theinvention.

DETAILED DESCRIPTION

Overview

Data can be categorized into facts, information, hypothesis, anddirectives. Activities that generate certain categories of data based onother categories of data through the application of knowledge can becategorized into classifications, assessments, resolutions, andenactments. These categorizations can be used to enhance a diagnosticsystem, such as through historical record keeping. Such a diagnosticsystem can include a system that forecasts computing system failuresbased on the application of knowledge to system vital signs such asthread or stack segment intensity and memory heap usage by virtualmachines. These vital signs are facts that can be classified to produceinformation such as memory leak, stuck thread, deadlock, congestion, orother problems. Classification can involve the automatic generation ofclasses and trending of time series data with sample intervals havingirregular durations.

Maintaining Relations Between Data and Activities

According to an embodiment of the invention, techniques are disclosedfor maintaining formal relations between activities and the data thatmotivated those activities. More specifically, data formally recognizedas facts can be formally related with, or mapped to, a classificationactivity that derives information based on those facts. Such informationis also data in a general sense, but can be formally recognized asinformation, as distinct from facts. An assessment activity, whichderives a hypothesis based on such information, can be formally relatedwith, or mapped to, that hypothesis. A resolution activity, whichderives a directive based on such information and hypothesis, can beformally related with, or mapped to, that directive. The directive isalso data, but can be formally recognized as a directive, as distinctfrom facts and information. An enactment activity, which derives furtherfacts based on such a directive, can be formally related with, or mappedto, those further facts.

Thus, in an embodiment of the invention, each item of data can belabeled as a fact, as information, as a hypothesis, or as a directive.Each activity can be labeled as a classification, an assessment, aresolution, or an enactment. Raw data received from external sources tothe system, such as sensors, can be labeled as facts, which aregenerally quantitative rather than qualitative. A knowledge-basedautomated process or human judgment applied to such facts can be labeledas a classification. Data that results from the classification can belabeled as information. Information generally indicates what the factsare judged or determined to mean qualitatively. A knowledge-basedautomated process or human judgment applied to such information can belabeled as an assessment. Data that results from the assessment can belabeled as a hypothesis. Similarly, a knowledge-based automated processor human judgment applied to such hypothesis can be labeled as aresolution. Data that results from the resolution can be labeled as adirective. A directive generally prescribes an operation that is deemedappropriate for performance in an effort to remedy or improve a stateindicated by the information. A knowledge-based automated process orhuman operation applied to such a directive can be labeled as anenactment. An enactment generally carries out the operation prescribedby the directive. Data that results from the enactment, which may beobtained through measurements made relative to a state produced by theenactment, also can be labeled as facts. A further classification can bemade relative to these facts, and so the sequence described above can berepeated iteratively. In each iteration, additional facts, information,and directives can be observed. In each iteration, additionalclassifications, assessments, resolutions, and enactments can beperformed. Thus, embodiments of the invention can involve cyclicalclassifications of facts producing information, assessments ofinformation producing hypothesis, resolutions of information producingdirectives, and enactments of directives producing further facts. Thecycle is called the CARE(classification-assessment-resolution-enactment) loop.

In an embodiment of the invention, for each classification that occursin a system, a mapping between that classification and the facts thatmotivated that classification can be generated and stored. For eachassessment that is made in the system, a mapping between that assessmentand the information that motivated that assessment can be generated andstored. For each resolution that is made in the system, a mappingbetween that resolution and the information that motivated thatresolution can be generated and stored. For each enactment that isperformed in the system, a mapping between that enactment and thedirective that motivated that enactment can be generated and stored.Additionally, a mapping between each classification and the informationresulting from that classification can be generated and stored.Additionally, a mapping between each assessment and the hypothesisresulting from that assessment can be generated and stored.Additionally, a mapping between each resolution and the directiveresulting from that resolution can be generated and stored.Additionally, a mapping between each enactment and the facts resultingfrom that enactment can be generated and stored.

In an embodiment of the invention, a set of object-oriented classes isestablished to categorize instances of facts, classifications,information, assessments, hypothesis, resolutions, directives, andenactments. Domain-specific subclasses of each of these classes can bederived from these classes. For example, for a specific domain (e.g.,data center health monitoring, diagnosis, and management), adomain-specific subclass of the fact class can be derived from the factclass, a domain-specific subclass of the classification class can bederived from the classification class, a domain-specific subclass of theassessment class can be derived from the assessment class, adomain-specific subclass of the hypothesis class can be derived from thehypothesis class, a domain-specific subclass of the resolution class canbe derived from the resolution class, a domain-specific subclass of thedirective class can be derived from the directive class, and adomain-specific subclass of the enactment class can be derived from theenactment class. Each of these domain-specific subclasses can be givenlabels and attributes that are appropriate to the domain to which theyare applicable. For example, in a data center health monitoring,diagnosis, and management domain, a domain-specific subclass of the factclass might be a thread dump class. For another example, adomain-specific subclass of the information class might be a stuckthread class. For another example, a domain-specific subclass of thedirective class might be a load balancing class.

In an embodiment of the invention, for each data item that is a fact, anobject that is an instance of the domain-specific subclass of the factclass can be instantiated to store the values of attributes that pertainto that data item. For each data item that is information, an objectthat is an instance of the domain-specific subclass of the informationclass can be instantiated to store the values of attributes that pertainto that data item. For each data item that is a directive, an objectthat is an instance of the domain-specific subclass of the directiveclass can be instantiated to store the values of attributes that pertainto that data item.

In an embodiment of the invention, for each activity that is aclassification, an object that is an instance of the domain-specificsubclass of the classification class can be instantiated to store thevalues of attributes that pertain to that activity. For each activitythat is an assessment, an object that is an instance of thedomain-specific subclass of the assessment class can be instantiated tostore the values of attributes that pertain to that activity. For eachactivity that is a resolution, an object that is an instance of thedomain-specific subclass of the resolution class can be instantiated tostore the values of attributes that pertain to that activity. For eachactivity that is an enactment, an object that is an instance of thedomain-specific subclass of the enactment class can be instantiated tostore the values of attributes that pertain to that activity.

In an embodiment of the invention, mappings between these objects can begenerated and stored. Such mappings can be recalled later, potentiallythrough the execution of queries against a database in which suchmappings can be stored.

The Classification-Assessment-Resolution-Enactment Loop

In an embodiment of the invention, four separate classes of data aredefined: facts, information, hypothesis, and directives. In anembodiment, four separate classes of knowledge are defined:classification, assessment, resolution, and enactment. An informationinstance can comprise observations and/or predictions and/or normsand/or objectives that have been distilled from facts by aclassification process. A hypothesis instance can be derived fromobservations and/or predictions that were made by an assessment process.A directive instance can be derived from hypotheses that were made by aresolution process. An enactment process can generate new facts.

In an embodiment, facts—raw input into the system—can be reduced toobservations and/or predictions and/or norms by applying classificationknowledge. Facts can be mapped to discrete tag properties that representan established terminology of observations. Observations can be used tocarry out an assessment in order to derive a hypothesis. Such ahypothesis can have a probability, magnitude, and reaction urgency.Observations, predictions, norms, and/or hypotheses can be used todetermine directives—action plans—for dealing with a situation.Directives can be carried out by applying enactment knowledge. Asdirectives are enacted, emerging facts can be classified. Furtherassessments can be carried out to determine whether the situation hasbeen resolved or whether further directives should be ascertained.

Techniques disclosed herein can be used to develop applications. Theknowledge, information, process, and social interaction model disclosedherein can be used to develop data-driven applications. Semantics can beassociated with data by distinguishing the data into facts, information,hypothesis, and directives. These data, so distinguished, can beinterrelated with classification, assessment, resolution, and enactmentknowledge using the CARE loop. Database technologies can be used toimplement the techniques disclosed herein and to implement the modeldisclosed herein.

Knowledge, Information, Process, and Social Interaction Model

Using the model disclosed herein as a general design pattern,evolutionary applications can be developed. Such applications can bedeveloped through the gradual injection of encoded knowledge processes.Such encoded knowledge processes can be used to automate manualprocesses. Directive class can be associated to a profile of necessarytacit knowledge to carry out the directive. Actor class can beassociated with a tacit knowledge profile. By matching the tacitknowledge requirement of a directive and tacit knowledge profile ofactors, optimal human resources can be selected and assigned to eachtask. The CARE loop can be used as an engine to build dynamic reactivesystems.

Knowledge, Data, and Actors

In an embodiment of the invention, three object-oriented classes can bedefined: the data class, the knowledge class, and the actor class.Objects can be instantiated from these classes. These objects can bestored in a database for an application. Multiple versions of eachobject can be maintained in the temporal database so that a history ofeach object can be obtained if desired.

Data objects—instances of the data class—can represent structured,semi-structured, and unstructured raw contents such as facts, eventstreams, relations, Extensible Markup Language (XML) documents, text,etc. Data objects also can represent metadata such as categories, tags,relationships, and containers. Data objects also can represent contentscaptured through acquisition processes such as user interface forms,prescription forms, and notification templates.

Knowledge objects—instances of the knowledge class—can representalgorithms, scripts, processes, queries, Resource Description Framework(RDF) axioms, production rules, decision trees, Support Vector Machines,Neural networks, Bayesian networks, hidden Markov models, Hopfieldmodels, tacit human knowledge, and others. Knowledge can be applied todata objects as those data objects are added, changed, or deleted. Theupgrading of a knowledge object can trigger the retroactive processingof data objects to which the knowledge in that knowledge object hasalready been applied. The knowledge in knowledge objects can be appliedas soon as those knowledge objects are deployed.

Actor objects—instances of the actor class—can represent individuals,groups of individuals, or organizations. Actor objects can haveattributes such as an organizational context, a skill profile, aknowledge profile, an interest profile, and a preference profile. Such aknowledge profile can indicate tacit knowledge that the actor objectpossesses but which the system might not possess in an encoded manner.When the actor object represents an individual, then the actor objectcan specify a real-time presence for the actor represented by theobject. When the actor object represents an individual, then the actorobject can specify a real-time activity for the actor represented by theobject. Actor objects can be assigned to pending directive optimallybased on the attributes of those actor objects.

In one embodiment of the invention, the data, knowledge, and actorclasses all can be derived from the same base class.

Facts, Information, Hypothesis, and Directives

In an embodiment of the invention, three separate object-orientedclasses can be derived from the data class discussed above: the factclass, the information class, the hypothesis class, and the directiveclass. Objects can be instantiated from these classes. The objects canbe stored in a database for an application.

Fact objects—instances of the fact class—can represent input into asystem. Such input can include, for example, a data stream from garbagecollector in JVM, stack traces from periodic thread dumps, a memory heapdump, a database AWR report, etc. Fact objects can representunstructured conversations, form inputs, or quantitative measurementscollected from a device.

Information objects—instances of the information class—can representqualitative interpretations of observations or predictions from facts.In an embodiment of the invention, three separate object-orientedclasses can be derived from the information class: the observationclass, the prediction class, the norm class, and the objective class.Objects of each class can be instantiated. Observation objects canrepresent individuations of facts into discrete values. For example, anintensity of threads blocking for database connections fact (a number)could be individuated into an observation object having a qualitativevalue such as normal, guarded, severe, or critical. Prediction objectscan represent qualitative values forecasted from changing conditions.Prediction objects can represent qualitative values interpolated orextrapolated by a model of observations, potentially through simulation.Norm objects can represent qualitative values of a historical baseline.Objective objects can represent target qualitative values whoseattainment should be sought for the observation and prediction objectsin order to achieve an overall objective and resolution. The differencebetween an objective and an observation can be classified. The degree ofthe difference between an objective and an observation can influence thedetermination of the directive.

Hypothesis objects—instances of the hypothesis class—can representdiagnoses or causes of the observations and/or predictions. For example,a failure of a load balancer that causes thread intensities of a classof threads to be classified as in hypertension state (intensitysignificant higher than the norm) in a first server and in hypotensionstate (intensity significant lower than the norm) in a second server ina cluster of two servers is a domain-specific example of a hypothesis.

Directive objects—instances of the directive class—can representactivities that are to be performed. An instruction for taking heapdumps or configure a memory management policy is a domain-specificexample of a directive.

Classifications, Assessments, Resolution, and Enactments

In an embodiment of the invention, four separate object-oriented classescan be derived from the knowledge class discussed above: theclassification class, the assessment class, the resolution class, andthe enactment class. Objects can be instantiated from these classes. Theobjects can be stored in a database for an application. These objectscollectively can represent abstractions of institutional knowledge. Suchknowledge can be encoded in an automated software program, for example,or such knowledge can be human knowledge. Knowledge can take the form ofan algorithm, technique, process, or method. Knowledge can be applied todata to derive other kinds of data.

Classification objects—instances of the classification class—canrepresent techniques for reducing quantitative facts into qualitativeobservations. The application of a classification technique can generatea compact representation of important facts taken from a pool of facts.

Assessment objects—instances of the assessment class—can representtechniques for generating a hypothesis about a cause of observations.These techniques can be manual, computer-guided, or fully automated.

Resolution objects—instances of the resolution class—can representtechniques for generating a set of directive to handle the hypothesis.These techniques can be manual, computer-guided, or fully automated.Resolutions can seek to develop directives based on how much theobservations or predictions are deviating from the norms.

Enactment objects—instances of the enactment class—can representtechniques for interpreting the intent of a directive and for executingthat intent. Enactments can seek to respond to a hypothesis. Enactmentscan seek to capture additional facts.

Actors

Actor objects—instances of the actor class—can represent people, groups,communities, and automated agents. Actor objects can possess attributessuch as profiles and presence contexts. A person can be an individualthat interacts with the system. A person's profiles can represent thatperson's disciplines, roles, and responsibilities. A person's tacitknowledge profile can be extracted automatically from messages, reports,and publications contributed or authored by that person. A group can bea team of individuals. A group's profiles can represent that group'sdisciplines, roles, and responsibilities. A group's tacit knowledgeprofile can be extracted automatically from messages, reports, andpublications contributed or authored by members of the group. Acommunity can be an organization, forum, conference, journal, etc. Acommunity's tacit knowledge profile can be automatically generated basedon the community's discourse. An automated agent can be software thatencapsulates algorithmic processes such as workflows, simulations,support vector machines, neural networks, and Bayesian networks to namea few. An automated agent can possess a profile that indicates thatagent's capabilities.

In an embodiment, knowledge activities, such as those represented byclassification objects, assessment objects, resolution objects, andenactment objects, can be assigned to an actor object based at least inpart on the attributes possessed by that actor object. Thus, eachactivity to be performed can be assigned to the actor who is mostcapable of performing that activity most efficiently.

In an embodiment, at least some attributes of actor objects can becaptured either directly or indirectly. These attributes can includeprofiles. An actor object can possess preferences. Using naturallanguage processing, an expertise-finding tool can extract an actor'sexpertise and interests from that actor's contributions, such asmessages, reports, and publications. Such expertise and interests can beindicated through nouns and topics. The tool can classify each nounphrase or topic as being an expertise, an interest, a like, a dislike, arecommendation, etc. In an embodiment, event subscriptions can beautomatically created for actors based on those actors' profiles.

In one embodiment, actors' profiles can change over time. Differentversions of these profiles over time can be maintained for each actor.Re-evaluation of an actor's contributions can cause that actor'sexpertise to change over time. An actor's history of profiles can bestored and queried in a bi-temporal database.

In an embodiment, profiles for an actor can be constructed automaticallybased on the contents of social interactions in which that actorengaged. These social interactions can include conversational threads,for example. Social interactions can be represented as containerobjects. Such social interaction container objects can representconferences, chat rooms, e-mail inboxes, e-mail outboxes, calendars,task lists, and forums. Actors's content contributions in thesecontainer objects can be profiled in context. The knowledge functionssuch as classification, assessment, resolution, and enactment can beparameterized such that the parameters are personalizeable to theexpertise, preference, and social network profiles of each actor to anextent possible while still observing the organization's constraints. Incertain embodiments, the actors can select the best team members basedon the situation, their own preferences, and limiting organizationalfactors.

Application Evolution

According to an embodiment of the invention, applications can evolveconstantly due to the separation of knowledge from user interfaceapplications. In an embodiment, knowledge can be maintained separatelyand an execution engine can apply the knowledge appropriately. Somekinds of knowledge, such as the tacit knowledge that is possessed byhuman beings, are not pre-known within a computing system. In oneembodiment, in order to enable the acquisition of these kinds ofknowledge, the system can present a user environment that encourages andmotivates users of that environment to express such kinds of knowledge.The system can present a user environment that rewards users of thatenvironment for expressing such kinds of knowledge. The system can thencapture the knowledge and use it for supervised learning of machines forclassification, assessment, resolution, and enactment purposes, forexample.

According to an embodiment of the invention, user interfaces areprovided through which human users can enter data that can be used todescribe why those users made the decisions that they did. The systemcan store such descriptions in association with data that indicates theactions that the users performs or caused to be performed. Thereafter,stored records can be queried in order to ascertain, for any actions,the reasons why those actions were performed. Additionally, such recordscan reflect the facts at the time upon which the decisions to performthe actions were based. Thus, processes can be documented in the system.

Some classification activities can be performed by human beings ratherthan by automated processes. In one embodiment of the invention, inresponse to a human being's performance of a classification activity,the system can ask the human being to provide a description of thesituation relative to which the activity is being performed. The systemcan then store this description in association with a classificationobject that represents the classification activity. In one embodiment,the system can ask the human being to provide annotations using arepertoire of vocabulary, potentially through guided social tagging. Thesystem can then store these annotations in association with theclassification object. In one embodiment of the invention, the systemcan ask the user to identify a minimum set of facts upon which theclassification activity was based. The system can then store this set offacts in association with the classification object.

Some assessment activities can be performed by human being rather thanby automated processes. In one embodiment of the invention, in responseto a human being's performance of an assessment activity, the system canask the human being to declare an assessment that will be conductedbased on a classification in order to arrive at a hypothesis. The systemcan ask the human being to annotate the assessment using a repertoire ofvocabulary through guided social tagging. The system can ask the humanbeing to indicate which observations, predictions, norms, andobjectives, in a set of classifications, are relevant to the assessment,potentially through guided social tagging. The system can ask the humanbeing to declare an assessment result in the form of a hypothesis byproviding a repertoire of vocabulary, potentially using guided socialtagging. The system can ask the human being to declare a resolution thatwill be conducted based on the assessment of a hypothesis. The systemcan ask the human being to annotate the resolution using a repertoire ofvocabulary through guided social tagging. The system can ask the humanbeing to specify an action plan in the form of one or more directives.The system can ask the human being to annotate the action plan as awhole and each of the directives within the action plan. The system canstore the inputs along with annotations in association with theassessment and resolution objects.

In an embodiment of the invention, when the system asks a human being toprovide an annotation, the system can recommend a repertoire ofvocabulary to the human being based at least in part on profiles thatare associated with the human being's actor object. In one embodiment ofthe invention, the system can recommend tags to the human being based onsimilarities of knowledge items associated with actor objects thatbelong to the same community to which an actor object associated withthe human being belongs. In one embodiment of the invention, the systemcan recommend tags to the human being based on the frequency of usage ofthose tags by other actors in a community of actors. In certainembodiments, the system can employ guided social tagging experiencesimilar to the popular social networking experience. Guided socialtagging can lead to more standardized vocabularies, more identifiablecases, and more repeatable processes. It lets the processes evolve fromad hoc practices to well defined and optimized practices (e.g. standardof care practices). Furthermore, user annotations can be used aspatterns for pattern recognition algorithms and positive and negativeexamples for supervised machine learning algorithms to enable theapplication to evolve with automation.

Application of the Data-Driven Framework to Specific Domains

In some application domains, such as an application to monitor thehealth and respond to issues in different parts of a large data center,the desired application behavior may not be completely specified,designed, and programmed ahead of time. For these systems, theapplication behavior needs to be implemented in a timely fashion inresponse to the convergence of evolving data and knowledge. After theapplication is implemented, the application behavior needs tocontinuously adapt to changing information represented in the data andknowledge. In such a domain the application development process must bedata driven, where application behavior is composed of functionalelements that encapsulate knowledge derived from data. For theapplication to evolve effectively with changing data and knowledge, theknowledge elements need to be managed as a form of data together withother types of data in a system that supports provenance tracking. Withprovenance support, when fact changes the system can re-characterize theknowledge which is derived from the facts and when knowledge changes thesystem can re-assess the information in the facts. In one embodiment ofthe inventions disclosed herein, the knowledge elements are categorizedby classification, assessment, resolution, and enactment types. Not allof the knowledge elements are encoded as automated functions orprocesses. The interactions through tacit knowledge of actors are alsocaptured as instances of the application of classification, assessment,resolution, and enactment knowledge in a provenance database. Thedata-driven process control tracks each classification action performedby either encoded knowledge or actor's tacit knowledge as a triple(fact, classification, information) in the provenance database. Eachassessment action performed by either encoded knowledge or actor's tacitknowledge is captured as a triple (information, assessment, hypothesis).Each resolution action performed by either encoded knowledge or actor'stacit knowledge is captured as a triple (hypothesis, resolution,directive). Similarly each enactment action performed by either encodedknowledge or actor's tacit knowledge is captured as a triple (directive,enactment, fact). In certain embodiment of the invention, theseinstances of triples are represented as Resource Description Framework(RDF) triples and Reification triples in the database.

In one embodiment of the inventions, the system serves as aClassification-Assessment-Resolution-Enactment (CARE) process controlengine, named after the four types of activities that drive the engine.The engine actively initiates the interactions between actors andautomated classification, assessment, resolution, and enactmentprocesses. The engine cycles through classification, assessment,resolution, and enactment stages to produce the fact, information,hypothesis, and directive data at each stage of the process cycle. In anembodiment, functions such as classification, assessment, resolution,enactment provide a process aspect, while facts, information,hypothesis, and directive provide a data aspect. The functions aretransformational in nature. In a certain embodiment, a CARE controlengine is empowered with complete control to generate and maintain thefact, information, hypothesis, directive data, as well as the provenancedata. In doing so, the CARE control engine can anticipate what data willbe available and when. The engine can also anticipate a time when enoughdata will be available to apply the right knowledge function of anyknowledge category. The engine can also enforce deadlines.

A CARE control engine is empowered with complete control to generate andmaintain tacit knowledge profiles of the actors, and capability profilesof the encoded classification, assessment, resolution, and enactmentfunctions. A CARE control engine can be empowered to profile the tacitknowledge and preferences of actors, select the most qualified actorsfor each directive, and assign tasks to the selected actors. Such anexecution model is amenable to evolutionary development of a decisionsupport automation system. In certain embodiments, reification of theclassification actions performed by actors with associated input factand output information in the provenance database can be used astraining samples for supervised learning of support vector machines orneural networks for automatic classification. Reification of assessmentactions performed in the system can be used as cases to derive theconditional probabilities in Bayesian networks as well as identify newassociations and causal dependencies to extend the Bayesian networks forautomatic assessment.

Disclosed herein is a framework in which the classification of facts isone of several operations that can be performed by actors orclassification machines or in conjunction with each other. Theinformation classified from fact is a summary of raw data and caninclude trend, prediction, norm, objective, and state vector. Inaddition to classification, the framework can involve assessment. Likeclassification, assessment is a kind of application of knowledge toinformation derived from facts. Assessment can be performed by actors orassessment machines or in conjunction with each other. In addition toclassification and assessment, the framework can involve resolution.Like classification and assessment, resolution is a kind of applicationof knowledge to a hypothesis derived from information. Resolution can beperformed by actors or resolution machines or in conjunction with eachother. In addition to classification, assessment, and resolution, theframework can involve enactment. Like classification, assessment, andresolution, enactment is a kind of application of knowledge according toa directive. Enactment can be performed by actors or enactment machinesor in conjunction with each other.

FIG. 12 is a block diagram of a framework that transforms various statesof data using various functions, according to an embodiment of theinvention. Framework 1200 includes fact data 1202, information data1204, hypothesis data 1206, and directive data 1208. Framework 1200 alsoincludes classification functions 1210 which transform fact data 1202into information data 1204, assessment functions 1212 which transforminformation data 1204 into hypothesis data 1206, resolution functionswhich transform hypothesis data 1206 into directive data 1208, andenactment functions which transform directive data 1208 into fact data1202.

The techniques to monitor the health and to respond to the health issuesof a computer system need to define the “vital signs” of the system. Thetechniques can involve monitoring of vital signs within time seriesdata. The time series data can originate from various sensors.Information contained within time series data is a specific type offact. Such vital signs can include, for example, memory usage and threador stack segment intensity. Seasonal trending techniques can make use oftime series data for “vital signs” of a computer system to performclassification of trends.

Seasonal trending and the classification of heap usage and thread orstack segment intensity are just some of many different possibleapplications of the framework disclosed herein. Using the framework,high-level information can be derived from low-level facts. Suchlow-level facts can be raw data such as JVM verbose GC logs and stacktraces, for example. The raw data can undergo transformations to extractincreasingly higher levels of classification information. For example,the thread segments in the stack traces can be classified into moreconcise information. After classifying the stack segments and threads,the technique can extract dependency relations among classes of threadsand drill-down composition of threads and stack segments, which arehigher forms of classification information. The time-series data forperiodic thread dumps contains trending information for each class ofthreads and stack segments. Seasonal trending transforms time seriesdata into higher forms of information, such as periodic seasonal cycles,linear trends, variance changes, level changes, level drifts, outliers,and endpoint predictions. The trend data can reduce a large volume oftime series data into a more concise sequence of events, with the numberof events proportional to the number of substantive trend changes overthe time window of observations.

In one embodiment, the system states can be identified by a vector offeatures extracted from the trend data, and system state changes can bedemarcated by events that represent substantive changes in the trend. Ina certain embodiment, a feature vector will be comprised of thequalitative state of each of the trend information, including seasonalfactors, linear trends, variance changes, level changes, level drifts,outliers, and endpoint predictions. Each type of quantitative data typescan be classified into as few as 2 or 3 discrete levels such as low,normal, or high. For example, intensity of a class of threads or stacksegments will be deemed normal if it is within 1-sigma band of theseasonally adjusted expected intensity. In this example, the value ofhigh or low over a time window of observation provides qualitativeinformation about the hypertension or hypotension state of this class ofthreads. In another example, the seasonal factors may exhibitdiscontinuity in the transition from weekend to weekday or from weekdayto weekend. The shapes of trends in seasonal factors (such as amonotonic pattern) within each season and the degree of discontinuity(such as a sawtooth pattern) connecting different seasons can bedescribed in qualitative form in a feature vector.

A feature vector, for example (high linear trend, high level drift, highvariance change, near endpoint) in a feature vector subspace (lineartrend, level drift, variance change, endpoint prediction), can beextracted from time series data in the JVM verbose GC log files. In oneembodiment, by observing the feature vector (high linear trend, highlevel drift, high variance change, near endpoint) that persists in a JVMfor a certain time window, the memory state of the JVM can be classifiedas Memory Leak. A state is valid only for a certain time intervaldemarcated by a start time t1 and an end time t2 of a time window whenthe feature vector persists in the JVM. The feature vector of the JVMmay change when a memory leak site is identified and fixed. Due to theapplication of a bug fix, subsequent observed state of the JVM may bedescribed by a new feature vector, for example (low linear trend, lowlevel drift, low variance change, no endpoint) that is classified asNormal Memory state, that may persist for the duration from start timet2 to end time t3. Hence the information may indicate that the systemhealth progressed from Memory Leak state to Normal Memory state. In oneembodiment, this state transition can be classified as an improvementtrend. Alternatively, after fixing the memory leak, a memory managementproblem may be manifested as high variance change in the feature vector(low linear trend, low level drift, high variance change, no endpoint).This may involve one more CARE control cycle to resolve during whichtime the system may undergo state transitions from Memory Leak state toMemory Management Problem state to Normal Memory state. If instead theobserved feature vectors were to change from Normal Memory state toMemory Leak state, in one embodiment the CARE control can classify theinformation as a regression trend and invoke an actor for assessment ofthe regression. The state of the memory feature space can be joined withthe state of other feature spaces such as thread or stack segmentintensity trends to form a composite state (Normal Memory state, NormalThread Intensity state) of the JVM. In a certain embodiment, the validtimes of the feature vector states can be managed using the valid timecolumns of a multi-temporal database schema (which is also known asbi-temporal database schema).

In one embodiment a first CARE control cycle may, in response to theinformation changes in an example scenario, classify a Memory Leak stateand invoke an assessment operation that derives a hypothesis. Inresponse to chain-reaction of information changes, the first CAREcontrol cycle may invoke a resolution that issues a directive to collecttwo heap dumps from the target JVM with a specified time lapse betweenthe dumps. This directive may be enacted by an actor and result in twoheap dump files among the new facts. A second CARE control cycle mayinvoke a classification operation to identify the memory leak site bycomparing the histograms of objects in the two heap dumps. A hypothesisabout a code bug may be issued after the assessment of a memory leaksite. A directive to fix and patch the bug may be issued after theresolution of a code bug. After the enactment of the directive to fixand patch the bug, a third CARE control cycle may classify the new factsas Memory Management Problem state and invoke an assessment operation.The assessment by an actor may then result in a hypothesis about amis-configuration of a memory management policy (e.g. soft reference LRUpolicy). The third CARE control cycle may invoke a resolution operationthat results in a directive to tune the soft reference LRU policy. Thisdirective to tune the memory management policy may be enacted by anactor. A fourth CARE control cycle may classify a Normal Memory statebased on the new facts collected by the last enactment. The fourth CAREcontrol cycle may then classify an Improving Trend by observing thestate transitions from Memory Leak state to Memory Management Problemstate to Normal Memory state.

In one embodiment, the CARE control will invoke actors to classify everynew facts in the feature vector space, for example a subspace (lineartrend, level drift, variance change, endpoint prediction), for each outof memory incidence in JVM's. When a sufficient number of positive andnegative samples are collected, the CARE control can apply supervisedlearning to construct a support vector machine to classify Memory Leakproblem. For example, a feature vector (high linear trend, high leveldrift, high variance change, near endpoint) can be classified as MemoryLeak by a support vector machine.

In one embodiment, the CARE control can register queries in the databasefor changes in information in the facts and in the knowledge elements,all of which are represented as data. Changes in the facts can beinduced by enactments. Changes in the information in the facts can beinduced by enactments as well as changes in knowledge elements thatextract or interpret the information. Changes in the knowledge elementscan be induced by online or offline machine learning processes, which incertain embodiments, are modeled as enactment processes. The CAREcontrol can initiate classification, assessment, resolution, andenactment actions in response to changes in the data. In certainembodiments, the CARE control engine can be implemented using thedatabase triggers, real-time journal analysis, and registered queries ontop of a bi-temporal database. In certain embodiments, CARE controlengine can register queries in the database for either object changenotification or query result change notification. An object referencedby a registered query is a registered object. Hence each object amongfact, information, hypothesis, and directive data can be a registeredobject. Similarly, each object among classification, assessment,resolution, and enactment knowledge elements can be a registered object.

The framework can enable the evolution of specialized algorithms thatcan be used to perform actions like classification, assessment,resolution, and enactment. Specialized algorithms might not necessarilywork together directly. Algorithms that monitor seasonal trends inthread or stack segment intensity do not necessarily work directly withalgorithms involving the determination of heap usage trends. The CAREcontrol allows these diverse algorithms to be developed independentlyand be integrated into a single system which is capable of evolving as acommon application, by encapsulating these algorithms as classification,assessment, resolution, and enactment components that interact vianormalized fact, information, hypothesis, and directive data model. Theaddition of new algorithms to a system can produce an additive effect.The algorithms within the system can complement and reinforce eachother. The algorithms can correlate with each other in order to achievebetter diagnosis. The CARE control execution model drives theinteractions by continuously querying the changes in the data andinitiating the execution of dependent components. Some of thesecomponents may involve user interface and messaging systems thatinteract with the human actors.

Domain-specific algorithms applied to domains such as seasonal trendingbased on various vital signs initially can be characterized asclassification elements within the framework. However, using theframework, such algorithms can be further refined and understood. Thisincreased refinement and understanding can produce the ability tocapture patterns that can be even more specialized for the particularenvironment in which they are being applied. This is a further degree ofclassification. This further degree of classification comes from therelating of diverse items of information to each other. For example, ina specific domain, thread or stack segment intensity information can berelated to memory usage information. Such information can be related todirectives that were issued within a system. A system can capture suchissued directives and formally relate them to information items to showa connection between them. As these relationships are built up withinthe system, patterns of relationships can become recognizable. The kindsof patterns that the system can recognize can evolve over time.

CARE control also serves as a model for visualization of the evolutionof data, knowledge, and state of the target systems being monitored. Forexample, raw data concerning a JAVA virtual machine's (JVM's) heap usagecan be monitored over time. Such raw data, in the framework, are factsthat can be classified through the application of knowledge. Theknowledge can take the form of a seasonal trending algorithm, signalprocessing algorithm, support vector machine, neural network, andBayesian network, to name a few. Information can be derived from the rawdata and represented in feature vectors. Higher level information cantake the form of a state identified with a classification of featurevector by a support vector machine. Such classification informationmight indicate a time interval when an aspect of the system ispersistently observed in a state. Such state information might becomposed to indicate, for example, points in time at which an aspect ofthe system is observed to transition from one state to another state,for example a point in time when a bug fix is applied on a JVM. Thesepoints in time can become apparent through a determination of the pointsin the time series plot at which the pattern of information changes.Sometimes the points in time when the information changes are notapparent in the raw data (they are not visible through naked eyes) aremade apparent only by the information extraction or signal detectionfrom the raw data. In an example scenario, the raw data or the trendinformation in a time series might show that during a first interval oftime, baseline JVM heap usage steadily drifts higher even in thepresence of high variance in heap usage. Such steady level drift in JVMheap usage can be the result of a memory leak. The raw data might thenshow that during a successive second interval of time, the baseline JVMheap usage, in the continuing presence of high variance, flattened out.The information change in the raw data at the point in between the firstinterval and the second interval can indicate that the memory leak wasfixed by some change made to the system. During the second interval, thehigh variance in heap usage might continue. Then, during a thirdinterval the information change in the raw data following the secondinterval, the variance in heap usage might decrease significantly,indicating that yet another change was made to the system in between thesecond and third intervals of time. The change between the second andthird intervals can be associated with a tuning action on a memory LRUpolicy.

In this example, multiple items of information can be derived from theraw data. First, information about the drift in the baseline heap usagecan be derived. Second, information about the change in the variance ofthe heap usage can be derived. An algorithm can derive such informationfrom the raw data. By filtering and transforming the raw data, noise andextraneous irrelevant information can be removed from the raw data,leaving only information that is of interest. The filtering can involvethe removal of seasonal trends in the data, for example. Within suchfiltered data, patterns can become more apparent to an automated systemthat attempts to find such patterns. Forecasting also may be performedbased on the data and the information derived there from. For example,based on the data and derived information, a prediction can be made thatin the absence of a system re-start, which counteracts the effects of amemory leak, the system will run out of memory and crash at a specificdate and time in the future. Such a forecast can be adjusted forseasonal (e.g., daily, weekly, quarterly) trends that occur in the data.

Each time that the raw data show a change in the system, producing thedistinctive first, second, and third intervals discussed above, thatchange can be the result of the issuance of some directive which is theoutput of a resolution action. Application of the CARE control frameworkdisclosed herein can also generate directives without invokingassessment actions. Associated with the seasonal trending of time seriesis the information based on the seasonal trend and deseasonalized linearand non-linear trends that can predict with a certain confidence levelthat, using the same example scenario for a JVM, the target JVM willcrash within a known period of time from the present if the system isnot restarted before the end of that time. Such a prediction may suggestto a system administrator that he ought to perform system maintenanceinvolving a restart of the JVM during some convenient time (e.g., aweekend) preceding the moment at which the predicted crash will occur.The CARE control may issue an urgent steering directive, such as torestart the JVM, after classifying an endpoint predicted in the nearterm. Also after a few days or weeks of monitoring the trends within thefirst interval of operating the JVM with memory leak condition, the CAREcontrol can invoke an assessment and a resolution that will entail adirective for an actor to collect heap dumps to identify the memory leaksite and to assess a bug fix. The enactment of a bug fix for memory leakmay take a few weeks. In the mean time until the bug fix is ready toapply to the target JVM, the JVM may operate with the memory leakcondition. The CARE control will continue to issue restart directives asneeded to steer the memory state of the JVM within an operating rangewhile the pending directive for a bug fix is being enacted. These nearterm steering directives are issued by classification using theinformation about the endpoint prediction and may not involve assessmentactions. When such restarts are enacted, information changes in the rawdata collected before and after those restarts can indicate the effectsthat those restarts had upon heap usage. The information changes inducedby JVM restarts can be monitored as short term trends and can beformally labeled in the CARE control model as instances of steeringdirectives that have no long term effect on the system. For example,despite the weekly restart of the JVM's, the feature vector, discussedabove, will persist in (high linear trend, high level drift, highvariance change, near endpoint), which is identified as Memory Leakstate. In contrast, the directive that apply the fix for the memory leakbug will have a lasting effect indicated by the transition from theMemory Leak state in the first interval to the Memory Management Problemstate in the second interval. Likewise a directive to tune the memoryLRU policy discussed above will have a lasting effect indicated by thetransition from the Memory Management Problem state in the secondinterval to the Normal Memory state in the third interval.

In the following formal notations, an n-tuple A can be regarded as afunction F whose domain is the tuple's implicit set of element indicesX, and whose codomain Y is the tuple's set of elements. Formally, ann-tuple (a₁, a₂, . . . , a_(n)) is a system (X, Y, F) where X={1, 2, . .. , n}, Y={a₁, a₂, . . . , a_(n)}, and F={(1, a₁), (2, a₂), . . . , (n,a_(n))}. An ordered pair is a 2-tuple and a triple is a 3-tuple. Aprojection of an n-tuple, denoted by π_(i), is a function π_(i)((a₁, a₂,. . . , a_(n)))=F(i)=a_(i).

An n-ary relation R is a set of n-tuples. The attributes of a relationare atoms in an n-tuple (α₁, α₂, . . . , α_(n)) which is a system (X, Z,G), X={1, 2, . . . , n}, Z={α₁, α₂, . . . , α_(n)}, and G={(1, α₁), (2,α₂), (n, α_(n))} such that the codomain of the function G is therelation's set of attributes. A projection of an n-tuple, denoted byπ_(αi), is a function π_(αi)((a₁, a₂, . . . ,a_(n)))=F(G⁻¹(α_(i)))=a_(i). A projection π_(αi)(R) of an n-ary relationR is a set obtained by restricting all the tuples in R to the attributeα_(i). For example, π_(FeatureVector):FeatureVector×ValidTime×FigureOfMerit→FeatureVector. The projectionπ_(FeatureVector)(Observation) is a set obtained by restricting alltuples in Observation to the attribute FeatureVector. Each n-tuple in ann-nary relation is implicitly associated with a system change number(SCN) that represents the transaction time when the n-tuple becomespersistent or recoverable. There is a projection function π_(SCN) whosedomain is a set of n-tuples and whose codomain is a set of system changenumbers (SCN). There is a function: SCN→DateTime that computes aDateTime for an SCN.

The selection σ_(proposition)(R), where R is a relation and propositionis a Boolean expression, selects the tuples in R that satisfy theproposition. For example, given that AssessmentInput is a relation inFeatureType×Assessment, the selectionσ_(FeatureType=MemoryState)(AssessmentInput) is a set of tuples inAssessmentInput relation whose FeatureType matches MemoryState. Thequery π_(Assessment)(σ_(FeatureType=MemoryState)(AssessmentInput)) is aset of Assessment functions that take a MemoryState Feature as an input.

In an embodiment of the invention, a KIDS system is a 6-tuple of Actor,Agent, Entity, CARE, Metadata, and Reification.KIDS=(Actor,Agent,Entity,CARE,Metadata,Reification)

Actor is a set of actors who can interact with the system to performclassification, assessment, resolution, and enactment actions.

TacitKnowledgeProfile, SocialNetworkProfile, and PreferenceProfile are 3different functions each of which maps a member of Actor to aProfileVector.TacitKnowledgeProfile:Actor→ProfileVectorSocialNetworkProfile:Actor→ProfileVectorPreferenceProfile:Actor→ProfileVector

ProfileVector is a set of n-tuples of Profile, n=1, 2, 3, . . . .ProfileVector=Profile^(n)

Profile is a relation among a Value, a ValidTime, a FigureOfMerit, and aProfileType.Profile=Value×ValidTime×FigureOfMerit×ProfileType

Personalization is a curry operation that applies a profile vector to aparameterized function template to produce a personalized function:Personalization:FunctionTemplate×ProfileVector→FunctionFor example knowledge functions such as Classification, Assessment,Resolution, and Enactment functions can be personalized by applying aProfileVector derived from an Actor's tacit knowledge or preferenceProfile's:Personalization(ClassificationTemplate)(ProfileVector)=ClassificationPersonalization(AssessmentTemplate)(ProfileVector)=AssessmentPersonalization(ResolutionTemplate)(ProfileVector)=ResolutionPersonalization(EnactmentTemplate)(ProfileVector)=Enactment

Agent is a set of computer programs or hardware devices that act forUser's.

Entity is a set of entities being monitored. Entity can include JavaVM's, Oracle VM's, databases, servers, server clusters, domains, pods,network switches, firewalls, individual classes of threads and threadsegments in a server, etc.

A CARE is an ordered pair of Data and Knowledge.CARE=(Data,Knowledge)

Data is a 4-tuple of Fact, Information, Hypothesis, and Directive.Data=(Fact,Information,Hypothesis,Directive)

Fact is an ordered pair of FSD and Feature.Fact=(FSD,Feature)

FSD (Flexible Schema Data) is a relation among an n-tuple of Value, aValidTime, an Entity, and a FSDType.FSD=Value^(n)×ValidTime×Entity×FSDTypeAn example of a FSD object is a thread-dump-file containing a series ofthread dumps from a Sales-Server in a CRM-Domain in an XYZ-Pod, whereSales-Server, CRM-Domain, and XYZ-Pod are members of Entity, andthread-dump-file is a member of FSDType.

Feature is a relation among a Value, a ValidTime, a FigureOfMerit, anEntity, and a FeatureType. A Feature represents a categorical value,such as low, normal, high, in a range of observations of data.Feature=Value×ValidTime×FigureOfMerit×Entity×FeatureTypeAn example of a Feature object is a hypertension-state of asubmit-order-thread in an OrderCapture-Server in a CRM-Domain in anXYZ-Pod, where submit-order-thread, OrderCapture-Server, CRM-Domain, andXYZ-Pod are members of Entity, and hypertension-state is a value in therange specified by a thread-intensity or stack-segment-intensityFeatureType.

FeatureVector is a set of n-tuples of Feature, n=1, 2, 3, . . . .FeatureVector=Feature^(n)In one embodiment, a FeatureVector is an array of Features that have acommon ValidTime.

ValidTime is a set of ordered pairs of DateTime. A time interval denotedby [t1, t2) is a set {t|t1<t2 and t>=t1 and t<t2, where t, t1,t2εDateTime}. For example, two ValidTime's [2013-08-31 12:00 AM PST,2013-09-01 9:00 AM PST) and [2013-09-01 9:00 AM PST, ∞) can be joinedinto one ValidTime [2013-08-31 12:00 AM PST, ∞). A time instance t1 canbe denoted by [t1, NA).ValidTime=[DateTime,DateTime∪{∞·NA})

FigureOfMerit is a quantitative or qualitative value representingconfidence level, confidence interval, probability, score, root meansquare error, etc. The FigureOfMerit is discussed further below inconnection with FIG. 13.

Information is a 4-tuple of Observation, Prediction, Norm, andObjective.Information=(Observation,Prediction,Norm,Objective)Observation is a relation among a FeatureVector, a ValidTime, and aFigureOfMerit.Observation=FeatureVector×ValidTime×FigureOfMeritPrediction is a relation among a FeatureVector, a ValidTime, and aFigureOfMerit.Prediction=FeatureVector×ValidTime×FigureOfMeritNorm is a relation among a FeatureVector, a ValidTime, and aFigureOfMerit.Norm=FeatureVector×ValidTime×FigureOfMeritObjective is a relation among a FeatureVector, a ValidTime, and aFigureOfMerit that optimizes an objective function.Objective=FeatureVector×ValidTime×FigureOfMerit

Hypothesis is a relation among a FeatureVector, a ValidTime, and aFigureOfMerit.Hypothesis=FeatureVector×ValidTime×FigureOfMerit

Directive is a relation among a FeatureVector, a ValidTime, and aFigureOfMerit.Directive=FeatureVector×ValidTime×FigureOfMerit

Knowledge is a 4-tuple of Classification, Assessment, Resolution, andEnactment.Knowledge=(Classification,Assessment,Resolution,Enactment)

Classification is a set of functions each of which maps an n-tuple ofFSD or an m-tuple of FeatureVector to an Observation, a Prediction, aNorm, or an Objective.Classification={f|f:(FSD^(n)∪FeatureVector^(m))→(Observation∪Prediction∪Norm∪Objective),for some integer n, m}

Assessment is a set of functions each of which maps a FeatureVector to aHypothesis.Assessment={f|f:FeatureVector→Hypothesis}

Resolution is a set of functions each of which maps a FeatureVector to aDirective.Resolution={f|f:FeatureVector→Directive}

SymptomResolution is a subset of Resolution functions whose domains arerestricted to the FeatureVector among Fact or Information.SymptomResolution={f|f:FeatureVector→Directive, such thatFeatureVector=π_(FeatureVector)(codomain(g)) where function g is amember of Enactment or Classification}

ClassificationResolution is a subset of Resolution functions whosedomains are restricted to the FeatureVector among Observation,Prediction, Norm, and Objective in the Information.ClassificationResolution={f|f:FeatureVector→Directive, such thatFeatureVector=π_(FeatureVector)(codomain(g)) where function g is amember of Classification}

AssessmentResolution is a subset of Resolution functions whose domainsare restricted to the FeatureVector among Hypothesis.AssessmentResolution={f|f:FeatureVector→Directive, such thatFeatureVector=π_(FeatureVector)(codomain(g)) where function g is amember of Assessment}

ExpertResolution is a subset of Resolution functions which is acomposition of Classification, Assessment, and Resolution functions:ExpertResolution=Classification·Assessment·ResolutionExpertResolution:(FSD∪FeatureVector)→(Observation∪Prediction∪Norm)×Hypothesis×Directive

Enactment is a set of functions each of which maps a Directive to acollection of FSD or a collection of FeatureVector.Enactment={f|f:Directive→(FSD^(n)∪FeatureVector^(m)), for some integern, m}

MetaData is a 4-tuple of ProfileType, FSDType, FeatureType, andInfluence.MetaData=(ProfileType,FSDType,FeatureType,Influence)

ProfileType is a set of objects, each of which defines a Name, a dataType, and a Range of values for a Profile. A ProfileType can specify aName such as “Role” and value Range such as (Foreman, Supervisor,Superintendant, Manager). In another example, a ProfileType can specifya Name such as “Responsibility” and a value Range such as (WebLogicAdmin, Database Admin, Linux Admin, Network Admin). For another example,for a ProfileType having a Name “Memory Tuning Expertise,” the Rangecould include qualitative values such as “expert,” “intermediate,” and“apprentice.” For another example, for a ProfileType having a Name“Application Source Code Knowledge” the Range could include qualitativevalues such as “developer,” “architect,” and “tester.” Such values canbe used to define a Profile.ProfileType=Name×Type×Range×DefaultValue

FSDType is a set comprised of categorical values defining the type offiles, such as verbose GC logs, periodic thread dumps, heap dumps, OSWatcher logs, database AWR snapshots, database trace files, clickstreams, REUI records, access logs, and regular or irregular time seriesdata filtered into aggregates such as seasonal factors, level drifts,level shifts, level spikes, variance changes, outliers, endpointpredictions, restarts, out of memory events, stuck thread events, etc.FSDType=Name×{Binary,Text}×Encoding×Language

FeatureType is a set of objects, each of which defines a Name, a dataType, and a Range of values for a Feature. A FeatureType can specify aName such as “Memory State” and value Range such as (Memory Leak, MemoryManagement Problem, Normal Memory). In another example, a FeatureTypecan specify a Name such as “Thread Intensity State” and a value Rangesuch as (Hypertension, Hypotension, Convoy Effect). For another example,for a FeatureType having a Name “variance,” the Range could includequalitative values such as “high,” “normal,” and “low.” For anotherexample, for a FeatureType having a Name “endpoint,” the Range couldinclude qualitative values such as “near,” “far,” and “no endpoint.”Such values can be used to define a Feature.FeatureType=Name×Type×Range×DefaultValue

A Feature can be extracted from data. The Type can be categorical ratherthan quantitative. Together, Feature and FeatureType define a name-valuepair which can be constrained to a set of allowed values. When thesevalues are extracted from data, a valid time for those values can bepropagated along with the Feature. A discussion of valid time isprovided below.

FIG. 13 is a diagram that shows a trend, according to an embodiment ofthe invention. Using techniques described herein, based on the trend, anendpoint 1302 can be predicted at a certain time and date. A valid time1304 is associated with the trend data that have been used to predictendpoint 1302. In this case, the endpoint is predicted to occur within afew hours of valid time 1304. The data used to predict endpoint 1302 arepart of valid time 1304. Such data might be used, for example, torestart a JVM before endpoint 1302 is reached.

In an embodiment, a valid time 1306 can span multiple intervals, wherethe boundaries of each interval are defined by some event, such as arestart of a JVM. Each time interval, or segment, can show that it istemporally close to some endpoint. The closeness of the endpoint is anexample of a feature. In this case, the valid time may be delimited bythe life cycle of the JVM. In another example, a valid time might bedelimited by the life cycle of a database. After repeated patterns suchas those shown in FIG. 13, it is expected that some state may change.For example, a bug fix might cause state to change. During a valid time1308 subsequent to such an event, the trend might not be increasing.

As is discussed above, a figure of merit may represent a confidenceinterval or a probability. For example, if the figure of meritrepresents a confidence interval 1310 in FIG. 13, then the figure ofmerit might indicate that confidence interval 1310 for the prediction ofendpoint 1302 is plus or minus 5 hours. Although in some embodiments afigure of merit can be represented quantitatively, in other embodiments,a figure of merit can be represented qualitatively. For example, ratherthan confidence interval 1310 being a quantitative measure such as plusor minus 5 hours, confidence interval 1310 may be a qualitative measuresuch as “fairly accurate.” Such a qualitative measure may be asubjective, rather than an objective, notion.

Multiple statistical parameters may be observed from the same machine.In addition to a steady trend, an observation might be made of heavilyfluctuating variances that approximate the steady trend. A featurerepresenting the heavily fluctuating variances may be represented by adifferent feature type than the feature type that represents theendpoints. The feature type for the variances might include a range ofqualitative values such as “high,” “normal,” or “low,” for example. Thevalid times for the features may overlap, however. The features mayrepresent different aspects of the same system. The valid time for eachfeature may be propagated through the system along with that feature. Inone embodiment, the valid time for a feature vector that includesmultiple features is the intersection of the valid times for all ofthose features.

An observation of fact data may reveal that multiple different featuresare correlated. Such a correlation may be revealed, for example, whenthe span at which the features' valid times overlap is smaller than thevalid time of the entire data set.

Influence is a 8-tuple of input and output relations between FSDType,FeatureType, and elements of Knowledge.Influence=(ClassificationInput,ClassificationOutput,AssessmentInput,AssessmentOutput,ResolutionInput,ResolutionOutput,EnactmentInput,EnactmentOutput)ClassificationInput is a relation among a FSDType or a FeatureType and aClassification.ClassificationInput=(FSDType∪FeatureType)×Classification×MandatoryClassification Output is a relation among a Classification and aFeatureType.ClassificationOutput=Classification×FeatureTypeAssessmentInput is a relation among a FeatureType and an Assessment.AssessmentInput=FeatureType×Assessment×MandatoryAssessmentOutput is a relation among an Assessment and a FeatureType.AssessmentOutput=Assessment×FeatureTypeResolutionInput is a relation among a FeatureType and a Resolution.ResolutionInput=FeatureType×Resolution×MandatoryResolutionOutput is a relation among a Resolution and a FeatureType.ResolutionOutput=Resolution×FeatureTypeEnactmentInput is a relation among a FeatureType and an Enactment.EnactmentInput=FeatureType×Enactment×MandatoryEnactmentOutput is a relation among an Enactment and a FSDType or aFeatureType.EnactmentOutput=Enactment×(FSDType∪FeatureType)Mandatory is a Boolean that indicates whether an input FeatureType ismandatory to invoke a function.

Reification is a 5-tuple of (CARELoop, Classified, Assessed, Resolved,Enacted).CARELoop=Classified×Assessed×Resolved×EnactedClassified=(FSD∪FeatureVector)×Classification×(Observation∪Prediction∪Norm)×(Actor∪Agent)×TransactionTimeAssessed=FeatureVector×Assessment×Hypothesis×(Actor∪Agent)×TransactionTimeResolved=SymptomResolved∪ClassificationResolved∪AssessmentResolved∪ExpertResolvedSymptomResolved=FeatureVector×SymptomResolution×Directive×(Actor∪Agent)×TransactionTimeClassificationResolved=FeatureVector×ClassificationResolution×Directive×(Actor∪Agent)×TransactionTimeAssessmentResolved=FeatureVector×AssessmentResolution×Directive×(Actor∪Agent)×TransactionTimeExpertResolved=FeatureVector×ExpertResolution×Observation×Prediction×Norm×Hypothesis×Directive×(Actor∪Agent)×TransactionTimeEnacted=Directive×Enactment×(FSD∪FeatureVector)×(Actor∪Agent)×TransactionTime

TransactionTime is a set of ordered pairs of DateTime. A time intervaldenoted by [t1, t2) is a set {t|t1<t2 and t>=t1 and t<t2, where t, t1,t2εDateTime}. For example, two TransactionTime's [2013-08-31 12:00 AMPST, 2013-09-01 9:00 AM PST) and [2013-09-01 9:00 AM PST, ∞) can bejoined into one TransactionTime [2013-08-31 12:00 AM PST, ∞). A timeinstance t1 can be denoted by [t1, NA). TransactionTime records the timeperiod during which an information becomes persistent or becomesrecoverable and visible to other recoverable transactions.TransactionTime=[DateTime,DateTime∪{∞·NA})

When there is a change in a FSD, for example when the GC logs for a JVMare updated, the CARE control can determine the FSDType. The CAREcontrol can use the FSDType to select the Classification functioninfluenced by FSD's of that FSDType from among the ClassificationInputrelations. CARE control can also query a closure of FeatureType'scomprising the input for the Classification function. CARE control canthen compose the required FSD and FeatureVector to invoke theClassification. If the Classification function is represented by aSeasonal Filter, a Decision Rule, a Support Vector Machine, etc., theCARE control will initiate the execution of the function. If theClassification function is represented by a tacit knowledge profile, theCARE control will identify one or more actors whose tacit knowledgeprofile best matches the tacit knowledge profile of the Classificationfunction and initiate the interactions with the actors to perform theclassification action. In both cases of machine and tacit knowledgeclassification, the result of this Classification function is anObservation, Prediction, or Norm. After this step, the CARE control canreify a relation among a collection of input FSD, a collection of inputFeatureVector, a Classification function, and an Observation or aPrediction or a Norm. The CARE control can include any number ofActor's, any number of Entity's, a version of the program implementingthe Classification function, parameters applied to the Classificationfunction, and other contextual information in the reification.

In certain embodiments, a ValidTime of a FSD can be derived from theValidTime's of segments of the time series data. Similarly a ValidTimeof a FeatureVector can be derived from the intersection of theValidTime's of each of the Feature's in the FeatureVector. After theinvocation of a Classification function, a new FeatureVector will beproduced which will trigger information change notifications. The CAREcontrol can select any Classification, Assessment, and Resolutionfunctions influenced by any of the Feature's in the new FeatureVector,respectively, from among the ClassificationInput, AssessmentInput, andResolutionInput relations. After taking a closure of all requiredFeature's corresponding to the FeatureType's influencing theClassification, Assessment, and Resolution functions, the CARE controlcan invoke these selected functions in sequence or parallel. In anexample scenario, upon a change notification of a new FeatureVector,e.g. (high level drift, high variance change, near endpoint prediction),the CARE control can select a higher level Classification function toclassify this FeatureVector. A higher level Classification function,such as a support vector machine, can map a FeatureVector in a Featurespace (seasonal factors, level drifts, level shifts, variance changes,outliers, endpoint predictions, restarts, out-of memory events) to acategorical Feature such as Memory Leak, Memory Management Problem,Normal Memory, Hypertension, Hypotension, Convoy Effect, Deadlock, etc.After classifying a Memory Leak state, the CARE control can receiveanother notification of information change.

Machine learning techniques, such as those supervised learningtechniques that learn support vector machines, can receive a set offeature vectors with associated classifications as input and canautomatically learn to classify new data points therein as belonging toseparate distinct classifications. FIG. 14 is a diagram that shows anexample of a set of data points that have been automatically classified,according to an embodiment of the invention. Points on one side of classdivider 1402 are deemed to belong to a class 1404, while points on theother side of class divider 1402 are deemed to belong to a class 1406.For example, class 1404 might contain data items that are “true,” whileclass 1406 might contain data items that are “false.” In this example,the classification is binary. In various embodiments of the invention,the classification can be N-way, where N is the number of classes. Thus,a support vector machine can receive a feature vector and, using one ormore class dividers such as class divider 1402 that was previouslylearned in supervised manner from a set of classified sample data, candetermine the class of the feature vector based on data contained withinthat feature vector. Data points in one class might indicate that amemory leak exists in a system, while data points in the other classmight indicate that there is no memory leak in the system.

After invoking a Classification function, if the CARE control selects aResolution function, it can execute the Resolution function to produce aDirective. Such a Directive produced after a Classification functionwithout an Assessment function can be used to steer the system along adesired trajectory, to collect a new component of Fact, or to quicklyavert a catastrophic failure. For example, if a Feature vector indicatesthat a JVM is about to run out of memory, a Directive may be issued torestart the JVM in a weekend to avoid a crash during the seasonal peaktime in the following weekdays. In embodiments of the intervention, theCARE process cycle can iterate to maintain all Observation's andPrediction's within some tolerance of the Norm or the Objective byissuing Directive's.

In another example scenario, the CARE control can select an Assessmentfunction that is influenced by the new set of Feature's in a newFeatureVector. The CARE control can query the required FeatureTypeinfluencing the Assessment function from among the AssessmentInputrelations. The CARE control can then query a closure of the Feature'srequired to satisfy the Assessment function. In one situation, anAssessment function may be assigned to an Actor whose tacit knowledgeprofile matches the expertise profile of the Assessment function. Inanother situation, an Assessment function can be represented by aBayesian network. The CARE control can compose a FeatureVector over theFeature space required to satisfy the Bayesian network. The ValidTime ofthe input FeatureVector for the Bayesian network can be derived from theValidTime of each of the component Feature's as discussed above. TheCARE control can then initiate the execution of the Bayesian network.After the execution of the Bayesian network, CARE control can reify arelation among a FeatureVector, a Bayesian network representing anAssessment function, and a Hypothesis.

Upon a change notification of a new FeatureVector associated with aHypothesis of a Bayesian network, the CARE control can select anyResolution functions that are influenced by the Feature's in the newFeatureVector from among the ResolutionInput relations. After taking aclosure of the Feature's corresponding to the FeatureType's required fora Resolution function, the CARE control can invoke the Resolutionfunction to produce a Directive. If the Resolution function isrepresented by a tacit knowledge profile, the CARE control will identifyone or more actors whose tacit knowledge profile best matches the tacitknowledge profile of the Resolution function and initiate theinteractions with the actors to perform the resolution action. The CAREcontrol can reify a relation among a FeatureVector, a Resolutionfunction, and a Directive.

In certain embodiments, the CARE control process can select aSymptomResolution or ClassificationResolution function upon a changenotification of a new FeatureVector produced by an Enactment orClassification function. The CARE control process can wrap the selectedSymptomResolution or ClassificationResolution function with anAssessmentResolution function whose purpose is to produce a Hypothesis.If the SymptomResolution or ClassificationResolution function soselected is associated with a tacit knowledge profile, the CARE controlprocess will select one or more Actor's whose tacit knowledge profilesmatch the tacit knowledge profile associated with the SymptomResolutionor ClassificationResolution function. The CARE control process willselect an AssessmentResolution function which supplies the vocabulary tocompose an appropriate Hypothesis (described as guided social tagging in[0049] and [0050]). The CARE control can ask the Actor to declare aHypothesis by providing a repertoire of vocabulary, potentially usingguided social tagging. The CARE control can reify a relation among aFeatureVector, a SymptomResolution or ClassificationResolution function,a Hypothesis, a Directive. The CARE control can include an Actor and anAssessmentResolution function in the reification. This reificationrelation between a FeatureVector and a Hypothesis and between aHypothesis and a Directive can be used as sample cases to developautomatic Assessment and AssessmentResolution functions by machinelearning techniques.

In certain embodiments, the CARE control process can select anExpertResolution function upon a change notification of a newFeatureVector produced by an Enactment function. An ExpertResolutionfunction is typically associated with a tacit knowledge profile. TheCARE control will select one or more Actor's whose tacit knowledgeprofiles match the tacit knowledge profile associated with theExpertResolution function. The CARE control will assign the Actor's toperform the ExpertResolution function. The Actor's can supply all thenecessary outputs of the ExpertResolution function, includingObservation, Prediction, Norm, Objective, Hypothesis, and Directive,potentially using guided social tagging. The CARE control can then reifya relation among a FeatureVector, an ExpertResolution function, anObservation, a Prediction, a Norm, an Objective, a Hypothesis, and aDirective. The CARE control can include one or more Actor's in thereification. In this scenario the Actor's can fulfill the roles ofClassification, Assessment, and Resolution in a single step.

Upon a change notification of a new Directive entailed by a Resolutionfunction, the CARE control can select an Enactment function that isinfluenced by the new set of Feature's in the new Directive'sFeatureVector. The CARE control can query the required FeatureTypeinfluencing the Enactment function from among the EnactmentInputrelations. The CARE control can then query a closure of the Feature'srequired to satisfy the Enactment function. The CARE control can theninvoke the Enactment function influenced by the Directive. A Directivesuch as an instruction to collect heap dumps of the target JVM can beassigned to an Actor whose profile includes JVM expertise.

Systems that support customer service requests, bug reports, or onlinehelp forums typically let a user post the problem in natural languagetexts and submit a set of files relevant to the problem. Theseunstructured data that includes natural language texts and log files cancomprise part of the Fact and Information data in CARE. Typicallyanalysts or other participants will suggest problem resolutions byresponding in natural language texts to the user's posts. In certainembodiments, Natural Language Processing (NLP) tools can be used toextract the FeatureVector's in the user's problem description texts andthe Directive's in the analysts' response texts. In an embodiment of theinvention, the CARE control can designate a SymptomResolution functionfor the purpose of reifying the FeatureVector's and Directive'sextracted from the unstructured content in external repositories. TheCARE control can import sample cases from the external bug report,service request, help forum repositories by reifying a relation among aFeatureVector, a SymptomResolution function, and a Directive for eachcase in the service requests, bug reports, or online help forums. TheCARE control can use the FSD and FeatureVector extracted from the casesin external repositories to simulate the CARELoop by invoking theClassification, Assessment, and Resolution functions in the system.

After several CARE control cycles in an example scenario, theReification can include (1) a set of FSD's for GC logs, that is relatedto (2) a FSD comprised of regular time series data for heap trends, thatis related to (3) a Classification function, that is related to (4) aFeatureVector derived from aggregates such as seasonal factors, leveldrifts, level shifts, level spikes, variance changes, outliers, that isrelated to (5) another Classification function, that is related to (6) aFeatureVector representing a Memory Leak state, that is related to (7)an Assessment function represented by a Bayesian network, that isrelated to (8) a FeatureVector representing a Memory Leak code bug aspart of a Hypothesis, that is related to (9) a Resolution function, thatis related to (10) a Directive to take heap dumps, that is related to(11) an Enactment function involving an Actor, that is related to (12) aset of FSD's for heap dumps of the target JVM, that is related to (13) aClassification function, that is related to (14) a FeatureVector derivedfrom the histogram of objects in the heap, that is related to (15) anAssessment function involving an Actor, that is related to (16) aHypothesis FeatureVector representing the site of the code causingmemory leak. The versions of the seasonal trend filter and filterparameters can be also directly or indirectly related. These relationscan be time stamped with TransactionTime's when they become persistentor become recoverable and visible to other recoverable transactions andrecalled later using bi-temporal ValidTime and TransactionTime queries.Based on these Reification relations, a user can determine, for anyevent manifested in the data, such as an information change thatoccurred in between two intervals, what the cause of that change was.The relation can show, for example, that Fact's during a particularinterval were classified as a memory leak, and that a bug fix was issuedas a Directive to repair the memory leak. In an embodiment, a user caninstruct the system to show all Directive's that were issued, in orderto make sense of why changes in the data occurred.

The framework disclosed tracks the ValidTime of each Information itemand TransactionTime when the item becomes persistent or becomesrecoverable and visible to other recoverable transactions. BothValidTime and TransactionTime can allow the Directive's, and the reasonsfor them, to be well-documented. For each Directive, the Informationupon which that Directive was based can be formally related to thatDirective. As a result, a user can retroactively determine, for eachDirective, the Information that was available as of the moment that theDirective was issued. Over time, new Information might become available,potentially as a result of previously issued Directive's and may beapplied retroactively to the states as of a ValidTime in the past atdifferent TransactionTime's when the Information becomes available (e.g.becomes recoverable and visible to other recoverable transactions).However, because Information changes occurring after the issuance of aDirective is clearly separated as non-causal to the Directive and isdelineated using the TransactionTime of the changes though the changesmay be applied retroactively as of the ValidTime attributes that areformally related to that Directive. Later-acquired Information thatmight have influenced the choice of Directive, if that Information hadthen been available, can be clearly identified as non-causal to theDirective and can be filtered from view using the TransactionTime, sothat the user is not confused by Information that potentially shouldhave caused a different Directive to be issued. At any moment in time,the system can inform the user why a particular Directive is issued, andthe Information that was available at that Directive's ValidTime tosupport the choice of that particular Directive, by recalling theInformation as of an earlier TransactionTime before any new Informationis amended at later TransactionTime's. In certain embodiments, thisbi-temporal provenance capability is used to meet certain regulatoryrequirements.

System Trending and Forecasting of Vital Signs

The framework discussed above can be used in a technique for determiningtrends and forecasting the future behavior of a computing system's“vital signs.” Such vital signs can include, for example, the memoryheap usage of a JAVA virtual machine (JVM) and the intensity ofprogrammatic threads or stack segments. By determining the trends ofthese vital signs, a determination can be made of whether a computingsystem is likely to crash. Based on such trends, a forecast can be maderegarding when the computing system is likely to crash. In response tosuch a forecast, a system administrator can schedule a system restart ormaintenance prior to the predicted crash, so that the crash can beavoided.

The task of determining trends can be conceptualized as theclassification of facts in order to produce information. The frameworkdiscussed above can systematically support such a classificationfunction. In this particular domain, the facts can involve facts abouthow much memory the JVM uses at various points in time and/or theintensities with which various blocks of program code are executed.Classification can involve the application of an automated process thattakes these facts and produces conclusive information such as that amemory leak apparently exists or that a particular block of program codeis an excessive “hotspot.”

Continuous monitoring of performance metrics for conformance to servicelevel agreements (SLA) is one of the critical operational requirementsfor cloud service providers. It needs predictive diagnosis capability todetect impending SLA violations to enable the operations to circumventmost of the SLA violations and provide quicker resolution of the issueswhen violations occur to minimize the impact on the customer experience.The key to the efficacy of predictive diagnosis solutions lies in therepresentation of a relatively high-level state space model of thesystem, that is amenable to estimation and update of the states fromlow-level events and measurements, and that can effectively predict thetrajectories of key performance indicators. The system state variablesshould include measurements of various system statistics that constitutethe vital signs of the system functions. One can draw an analogy to themeasurements of various physiological statistics such as heart rate,blood pressure, body temperature, and respiratory rate that representthe vital signs of basic body functions, which are characterized bynormal and abnormal ranges of measurements depending on the age,activities, and environmental context of a patient.

A vital sign for the cloud services functions can be defined based onthe measurements of intensity statistics for various classes of threadsand stack segments from a series of thread dump samples taken at regulartime intervals. The interpretation of this vital sign can be informed byan analytical model of thread or stack segment intensity statisticsformulated in the mathematical frameworks of the Poisson Process andQueuing Theory. An intensity-driven classification technique can beapplied to incrementally classify the threads and stack segments. Astate model of a system can be represented in terms of the seasonaltrends, linear trends, and first-order non-linear trends of theintensities of each class of threads and thread segments using theHolt-Winter exponential moving average filter. The state modelcharacterizes the regular operating ranges of the system that form thebaselines to detect measurement outliers. A cluster of outliers mayrepresent a hypertension or hypotension state of the system that may becorrelated with system faults and may be observable by customers as SLAviolations. The model supports dynamic classification of thread segmentsand an ability to drill-down the classification hierarchy to observe theintensity of specific subclasses of thread segments, thereby improvingthe observability and sensitivity for small performance glitches whichare leading indicators of SLA issues. The model also supports seasonallyadjusted long term performance trend forecasts. Thread or stack segmentintensity can be used as a vital sign of the system functions. Theobservability, sensitivity, and forecasting of a vital sign for systemfunctions all enable an effective predictive diagnosis capability.Furthermore, the model supports dependency information between classesof threads to capture the inter-thread and inter-process communicationbetween threads, providing observability to the traffic intensity of thequeues in the communication channels or resource pools between threads.

A thread dump from a WebLogic server in the mid-tier of a FusionApplication in Oracle Public Cloud can exhibit patterns that arecorrelated with system faults in the mid-tier, operating system (OS),network, and databases. The WebLogic server can be instrumented todetect threads that are stuck for longer than a specified time, which is10 minutes by default. An embodiment of the invention can employ thestate model of seasonal and long-term trends of thread intensities thatoffers an adaptive method to detect threads that are stuck for longerthan their expected response time. A large cluster of stuck threadsindicates the hypertension state of the system due to congestionsdownstream towards the backend servers and databases. The model can alsodetect hypotension states of the system due to congestions upstream ofthe system that leaves many threads idle. A high intensity of idlethreads is the converse of a high intensity of stuck threads.

Thread segments classification signatures can be learned from the threaddump archives collected from all customer pods across the cloud as wellas the thread dump archives from stress test systems which can amplifythe intensities of each class of threads. The thread classificationsignatures can be extracted by a MapReduce algorithm from a large amountof thread dumps stored in Hadoop Distributed File System (HDFS)clusters. These classification signatures can be bootstrapped onto thepredictive diagnostic monitor in the production system.

Thread Intensity or Stack Segment Intensity

Thread or stack segment intensity provides a statistical measure of the“hotness” of a performance hotspot in the system functions. The hotnessof a code block can be quantified by the number of invocations of thecode block times the execution time of the code block. Tools can measurethe invocation count and response time of low-level events, such as theexecution of an instruction at an instruction pointer, a method, asystem call, a synchronization wait, a hardware counter overflow, etc.One can instrument the application programs to collect the exactmeasurements of the events, but in such an approach, the instrumentationcan affect the measurements. This problem can be more pronounced whenthe execution time of the instrumentation code around a method dominatesthe execution time of the method itself as the invocation countincreases. Estimation of hotness measures by statistical sampling ofevents is more effective than exact measurements in this respect. Theperformance analysis tools provided by CPU vendors, including Oracle,Intel, and AMD, harness the hardware counters provided in the CPU's tosample the events. These tools offer time-based or event-basedstatistical sampling of the events. In time-based sampling, the toolrecords the event attributes such as the timestamp, instruction pointer,kernel microstate, thread id, process id, CPU core id, and call stack ateach timer interrupt event. In event-based sampling, the tool records asimilar set of event attributes at a hardware counter overflow event.Oracle, Intel, and AMD CPU's provide a set of hardware counters tosample the L1/L2 cache misses, branch mispredictions, floating pointoperations, etc. A histogram for the sample counts of instructionpointers in the program typically conveys a qualitative profile ofhotspots in the program. GNU gprof samples the execution time ofsubroutines but uses code instrumentation to measure the call counts.The sampling error is usually more than one sampling period. If theexpected execution time of a subroutine is n sampling periods, theexpected error of the execution time estimate is square root of nsampling periods.

The hotspot profiles of different parts of the program can be presentedin call graph, call tree, and call stack perspectives. In eachperspective, the call count statistics can be combined with basicexecution time statistics to attribute the execution times to the callerand called methods for roll-up and drill-down perspectives. A histogramfor the sample counts of instruction pointers in the program typicallyconveys a qualitative profile of hotspots in the program.

The analytical model of thread or stack segment intensity statisticsshows that the time-based and event-based sampling of the sites, eitherinstruction pointers or stack traces, provides a counter which shouldnot be interpreted as an approximation to the exact counting of thenumber of executions as measured by the instrumentation techniques. Thecounter value derived by statistical sampling is factoring in both thefrequency of the execution of the site and the response time of theexecution of the site. The exact counting of the number of executions ofa site does not factor in the execution time. The execution time of aninstruction at a given instruction pointer site depends on the number ofCPU clock cycles needed by the instruction. The extra factor accountedby the statistical sampling technique is a significant factor in theobserved discrepancy of the normalized root mean square error, samplecoverage, and order deviation metrics between the exact execution countand statistical sampling of instruction pointer sites. The statisticalsampling of sites can be treated as an intensity measure in ananalytical model.

Extending these analysis techniques, embodiments of the invention canuse the intensity statistics for automatic classification of call stacksand for a state space representation base lining the seasonal, linear,and first-order non-linear trends of the system vital signs. Embodimentsof the invention can extend the call stack model of a single class ofthreads to capture the dependency between classes of threads forinter-thread and inter-process communication. This model can represent achain of call stacks involved in client-server invocations via remotemethod invocation (RMI), Web Services, JAVA Database Connectivity (JDBC)connections, JAVA Naming and Directory Interface (JNDI) connections,etc. It can also represent the interaction of two or more call stacksthreads to enter a critical section or to acquire a resource from aresource pool (such as a JDBC connection pool). The discrepanciesbetween the intensity statistics of two interacting call stacks canreveal congestions in the communication channels or resource poolsbetween them. Furthermore, the call stack dependency model enables theoperators to correlate the incidence reports from multiple servers. AnExecution Context ID (ECID) propagated along an invocation chain by adiagnosability framework can be used to correlate the exception tracesacross the middleware and database tiers to aid in root cause analysisof problems in individual execution contexts. For diagnosing systemicproblems using a system vital sign, such as the thread or stack segmentintensity statistics, the dependency information between classes ofthreads or stack segments can be used to correlate incidences across themiddleware and database tiers to aid in root cause analysis.

To drill down the database tier threads, the system can collectstatistics for high level Structured Query Language (SQL) statementexecution status reports, such as SQL Automatic Workload Responsibility(AWR) reports, as well the low level thread dump of database server OSprocesses. Each thread class that is blocking for database operation viaJDBC connections can be correlated with a SQL statement execution planin the database server. The statistics such as the execution count andexecution time of a SQL statement execution plan in the interval betweentwo SQL AWR snapshots can be sampled periodically. The executionintensity of a SQL statement execution plan can be derived as a productof the execution count and the average execution time. From ahigh-intensity database operation thread in the mid-tier, an embodimentcan drill down to a high-intensity SQL statement in the database tier todiagnose a problem. For example, a suboptimal execution plan can drilldown to an improper database schema design or a lack of proper index forpredicate evaluations. Thus, a thread dependency information modelenables a monitor to correlate the intensity of mid-tier and databasetier threads to provide a complete end-to-end picture.

Classification of Middleware and Database Services

Fusion Applications (FA) include Financial Management, CustomerRelationship Management (CRM), Human Capital Management (HCM), SupplyChain Management (SCM), Project Portfolio Management (PPM), Procurement,and Governance Risk Compliance. Fusion Applications are organized inlogical pillars that represent a subset of Fusion Applications; forexample a tenant system can be comprised of three pillars, one pillarthat includes Financial, SCM, PPM, and Procurement services, a secondpillar that includes HCM services, and a third pillar that includes CRMservices. The pillar structure enables granular maintenance, patch, andupgrade of a large system. The pillars may share the same FA database,but to enable granular maintenance, patch, and upgrade of applicationsand data schemas, each pillar should have a separate database with tablereplications between the databases. Oracle Data Integrator (ODI) canperform the data transformations between the databases for two or morepillars if they are using different versions of a table. An FA tenantpod in Oracle Public Cloud (OPC) is classified by the set of families ofFA services that comprise the pillar; for example, the three FA pods inthe earlier example will be classified, respectively, by (Financial,SCM, PPM, and Procurement Pillar), (HCM Pillar), and (CRM Pillar)classes.

Oracle Fusion Application architecture is defined on top of the FusionMiddleware architecture which supports load balancing and highavailability of application services by organizing the applications intoa logical topology of servers and domains that can be mapped to severalpossible Oracle Virtual Machine (OVM) topologies (by editing theassembly produced by Oracle Virtual Assembly Builder) or physicaltopologies distributed across multiple hosts. A server is an instance ofWebLogic Server which runs the application services. A domain is aWebLogic Server Domain which contains one or more instances of WebLogicServers. A family of FA services such as {General Ledger, Receivables,Payables} for Financial Management can be organized in a set of Serversin the Financial Domain. An FA service is classified along theDomain×Server dimensions, for example (Financial Domain, Admin Server),(Financial Domain, General Ledger Server), (Financial Domain,Receivables Server), (Financial Domain, Payables Server), (CRM Domain,Admin Server), (CRM Domain, Customer Server), (CRM Domain, SalesServer), (CRM Domain, Order Capture Server), etc. Each class of FAservice can be deployed in a cluster for load balancing and highavailability.

The domain and server cluster structure can be mapped to an appropriateOVM topology in a pod. For example, the Admin services across alldomains in a Fusion Application pod, including (CRM Domain, AdminServer), (SCM Domain, Admin Server), (HCM Domain, Admin Server),(Financial Domain, Admin Server), etc., can be mapped to the same adminOVM. For a CRM tenant, the two classes of services (CRM Domain, CustomerServer) and (CRM Domain, Sales Server), which demands more CPU andmemory resources than other services, can be mapped in a cluster to apair of primary OVM's while the supporting services among (CRM Domain, .. . ), (SCM Domain, . . . ), (HCM Domain, . . . ), (Financial Domain, .. . ), (Procurement Domain, . . . ), and (Projects Domain, . . . )classes can be consolidated in a cluster in another pair of secondaryOVM's. Some Fusion Middleware services, such as ODI Server (Oracle DataIntegrator), SOA Server (Fusion Middleware SOA), and ESS Server(Enterprise Scheduler Service), can be duplicated in each domain topartition the work load.

A Fusion Application pod includes three logical database services,namely OAM DB (for Oracle Access Manager), OIM-APM DB (for OracleIdentity Management and Authorization Policy Manager), and Fusion DB(for application schemas), that can be mapped to several differenttopologies of RAC database servers. OAM repository contains policies forauthentication, Single-Sign-On (SSO), and identity assertion; OIMrepository contains user profiles and groups memberships; APM repositorycontains RBAC authorization policies. Fusion DB contains variousrepositories for FA, MDS, SOA, BI, UCM, and WebCenter. Oracle AccessManager (OAM) and Authorization Policy Manager (APM) use the WebLogicSecurity Services Provider Interface to provide services for JavaAuthorization and Authentication Services (JAAS) and Java AuthorizationContract for Containers (JACC). OAM WebGate, AccessGate, and WebServices Manager (OWSM) components in the WebLogic server access theauthentication policies in OAM repository. Oracle Platform SecurityServices (OPSS) framework in WebLogic server accesses the user's groupmembership information in OIM repository and uses this information toaccess the RBAC authorization policies in APM repository.

Data access operations in FA servers can be identified by the databaseservices (Database, OAM DB), (Database, OIM-APM DB), and (Database,Fusion DB) that they depend on. The following database dependencyinformation can be incorporated in the model:

-   -   OAM connections in the FA servers depend on Access Server and        OAM DB,    -   JNDI connections in the FA servers depend on Oracle Internet        Directory server and OIM-APM DB,    -   JDBC connections from the OPSS framework in the FA servers        depend on OIM-APM DB,    -   JDBC connections from ADF Business Components (ADF-BC) and        Metadata Services (MDS) in the FA servers depend on Fusion DB,    -   JDBC connections from BPM, WebCenter, UCM, and BI in the SOA and        BI servers depend on Fusion DB.        Classification of SQL Statements

A cloud customer's (tenant's) FA services can be distributed acrossmultiple pillars/pods, domains, and clusters of servers. The distributedservers effectively partition the database connections into JDBCconnection pools. Depending on the quality of service (QoS)requirements, the system can allocate a different number of JDBCconnections to each pool. For example, the connection pools in SalesServer, Order Capture Server, Marketing Server, Analytic Server, etc.,can be allocated with different numbers of JDBC connections to controlQoS. The sizing of the connection pools can be guided by the seasonalintensity trends and impedance matching of mid-tier database operationthread classes performing database operation, waiting for a connectionin JDBC connection pool, and active SQL statement classes. Partitioningof the database connections by mid-tier connection pools aids in theclassification of the SQL statements and enables isolation of problems.It can prevent a poorly tuned SQL statement in a low priorityapplication from blocking the highly performant SQL statements forhigh-intensity mid-tier threads.

Classification of Threads and Thread Dependency Relations by StackTraces

The stack trace for a stuck thread can reveal the operation blocking thethread. For example, by the stack frame “oracle jdbc driverOracleStatement doExecuteWithTimeout” near the beginning of thefollowing stack trace, the inference can be drawn that the thread isblocking for a database operation:

oracle.jdbc.driver.T4CCallableStatement.executeForRows-(T4CCallableStatement.java:991)oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout-(OracleStatement.java:1285) . . .oracle.mds.core.MetadataObject.getBaseMO(MetadataObject.java:1048)oracle.mds.core.MDSSession.getBaseMO(MDSSession.java:2769)oracle.mds.core.MDSSession.getMetadataObject(MDSSession.java:1188) . . .oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:150) . . .oracle.apps.setup.taskListManager.ui.customization.CustomizationFilter.    doFilter(CustomizationFilter.java:46) . . .weblogic.servlet.internal.WebAppServletContext.securedExecute-(WebAppServletContext.java:2209)weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1457) . . .weblogic.work.ExecuteThread.execute(ExecuteThread.java:250)weblogic.work.ExecuteThread.run(ExecuteThread.java:213)

In the above stack trace, the stack frame “oracle mds coreMetadataObject getBaseMO” below the JDBC driver stack indicates that theMDS library issues the JDBC operation. The stack frame “oracle adf modelservlet ADFBindingFilter doFilter” below the MDS library stack indicatesthat MDS is invoked by an ADF Application, which is invoked through aHypertext Transfer Protocol (HTTP) Servlet request. Since this thread isobserved in the Customer Server Weblogic instance in the CRM Domain, thestuck thread can be classified as (CRM Domain, Customer Server, HTTPServlet, ADF Application, ADF-MDS, DATABASE Operation). This threaddepends on a database server thread classified by (DATABASE, Fusion DB).

The following is a stack trace for another stuck thread:

com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:48) javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:637) javax.naming.InitialContext.init(InitialContextjava:219) . . .atoracle.adf.controller.internal.security.AuthorizationEnforcer.    checkPermission(AuthorizationEnforcer.java:114) . . .oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:150) . . .oracle.apps.setup.taskListManager.ui.customization.CustomizationFilter.    doFilter(CustomizationFilter.java:46) . . .weblogic.servlet.internal.WebAppServletContext.securedExecute-    (WebAppServletContext.java:2209)weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1457) . . .weblogic.work.ExecuteThread.execute(ExecuteThread.java:250)weblogic.work.ExecuteThread.run(ExecuteThread.java:213)

This stuck thread is blocked by a Lightweight Directory Access Protocol(LDAP) connection. The stack frame “oracle adfinternal controller stateControllerState checkPermission” below the JNDI stack indicates that theADF Controller is using the LDAP connection, probably to load permissionobjects from the LDAP server for authorization check. The second threadhas the same stack trace below the stack frame “oracle adf model servletADFBindingFilter doFilter” as the first thread. It therefore shares acommon classification (HTTP Servlet, ADF Application) with the firstthread. If the second thread is also observed in Customer ServerWeblogic instance in the CRM Domain, it will be classified as (CRMDomain, Customer Server, HTTP Servlet, ADF Application, ADF-SECURITY,LDAP Operation). The second thread depends on an OID thread classifiedby (OID), which in turn depends on the database server thread classifiedby (DATABASE, OIM-APM DB).

The threads classification information model captures the dependenciesof one class of threads on another. For example, the followingdependencies are defined for the super classes of threads to generalizethe dependencies of the subclasses:

(ADF Web Service Invocation)→(ADF Web Service, ADF-BC)

(ADF-BC, DATABASE Operation)→(DATABASE, Fusion DB)

(ADF-MDS, DATABASE Operation)→(DATABASE, Fusion DB)

(ADF-SECURITY, DATABASE Operation)→(DATABASE, OIM-APM DB)

(ADF-SECURITY, LDAP Operation)→(OID)→(DATABASE, OIM-APM DB)

(SOA-BPEL, DATABASE Operation)→(DATABASE, Fusion DB)

(ESS, DATABASE Operation)→(DATABASE, Fusion DB)

The dependency relation (ADF Web Service Invocation)→(ADF Web Service,ADF-BC) is a generalization that includes many subclasses of dependencyrelations among the ADF services. One of the subclasses of thisdependency relation is (CRM Domain, Sales Server, ADF-Application, ADFWeb Service Invocation)→(CRM Domain, Order Capture Server, ADF WebService, ADF-BC, DATABASE Operation). The thread segments on both clientside and server side of the relation can be drilled down. For instance,the client side of the dependency relation (ADF-BC, DATABASEOperation)→(DATABASE, Fusion DB) can be drilled down to a high-intensityrelation (CRM Domain, Order Capture Server, ADF Web Service, ADF-BC,DATABASE Operation)→(DATABASE, Fusion DB). Similarly on the server side,the call graph, call tree, or call stack model (including the SQLexecution plan and execution traces) in the database can be drilled downto a high-intensity subclass of the (DATABASE, Fusion DB) thread.

Subsumption Hierarchy

The subsumption hierarchy of the classification scheme is induced bytuple projection. For example, given that the tuple (Customer Server,ADF Application) is a projection of the tuple (CRM Domain, CustomerServer, HTTP Servlet, ADF Application) the classification (CRM Domain,Customer Server, HTTP Servlet, ADF Application) is subsumed under theclassification (Customer Server, ADF Application). Since theclassifications (CRM Domain, Customer Server, HTTP Servlet, ADFApplication, ADF-MDS, DATABASE Operation) and (CRM Domain, CustomerServer, HTTP Servlet, ADF Application, ADF-SECURITY, LDAP Operation) aresubsumed under the classification (CRM Domain, Customer Server, HTTPServlet, ADF Application) both of the sample threads above are subsumedunder any projection of (CRM Domain, Customer Server, HTTP Servlet, ADFApplication). Hence the statistics of the two sample threads areaggregated in the statistics of (CRM Domain, Customer Server, HTTPServlet, ADF Application) and its super classes.

The ADF application can be invoked through Outlook Connector and WebService in addition to HTTP Servlet. Additional classifications can bedefined in (Channel×Application) dimensions:

(HTTP Servlet, ADF Application)

(Outlook Connector, ADF Application)

(Web Service, ADF Application)

ADF Applications are deployed in different servers in different domains.One can classify them by taking cross products(Domain×Server×Channel×Application). For example, the classification(CRM Domain, Customer Server, HTTP Servlet, ADF Application) (CRMDomain, Customer Server, Outlook Connector, ADF Application), and (CRMDomain, Customer Server, Web Service, ADF Application) have the leastcommon super class (CRM Domain, Customer Server, ADF Application).

The Operation dimension includes the classifications Database Operation,LDAP Operation, Web Service Invocation, to name a few. The data accessLibrary is another dimension that includes the classifications ADF-MDS,ADF-SECURITY, ADF-BC, AQ-JMS, to name a few. The class hierarchy can bedrilled down by taking the cross product(Domain×Server×Channel×Application×Library×Operation).

A tuple can be treated as a state of a thread with valid statetransitions from reverse(cdr(reverse(tuple)))) to (tuple) in LISPexpressions. In this case, car(reverse(tuple)) gives the stack frames ontop of the stack trace. For example the thread in the state (HTTPServlet, ADF Application) can transition to the state (HTTP Servlet, ADFApplication, ADF-BC) when ADF Application invokes ADF-BC.

Disclosed herein is an intensity-driven classification technique thattracks the intensity of each stack frame over time and demarcates thestack segments in the stack traces by an equivalence relation among thestack frames induced by the intensities of the stack frames. It givesthe same classification to the stack frames that occur in the same stacksegment with the same intensity. This classification techniquecontinually splits the stack segments into smaller stack segments as theintensities of the individual stack frames in the segments diverge overtime. Each time a stack segment is split into constituent segments, thetechnique creates a new classification for each of the constituentsegments. For example, the technique may start with a classification(ADF Application Business Component) for a stack segment that may besplit into (ADF Application) and (ADF-BC) when the intensity of (ADF-BC)segment diverges from the intensity of (ADF Application) segment. Theclassification (ADF Application Business Component) is an alias of (ADFApplication, ADF-BC) which is subsumed under the new classifications(ADF Application) and (ADF-BC).

The technique generates a globally unique identifier (GUID) each time anew classification is created to classify a stack segment. When a stacksegment is split into constituent segments each of which is assigned anew classification, the algorithm may derive the identifiers of the newclassifications from the identifier of the classification of thecoalescing segment. For example, the identifier of the coalescingsegment might be 546372819. If this segment is split into 2 constituentsegments, the technique can assign identifiers 546372819-1 and546372819-2 to the constituent segments. If the segment 546372819-1 issplit up again to 2 constituent segments, the technique can assignidentifiers 546372819-1-1 and 546372819-1-2 to the constituent segments.

Tacit knowledge can be applied to assign meaningful names such as(ADF-BC), (ADF-MDS), or (ADF-VIEW) to the classifications. Tacitknowledge can also assign the dimensions, such as Channel, Application,or Operation to organize the classifications. A knowledge base ofclassifications and dimensions can be provided to bootstrap theautomatic classification technique. If the knowledge base specifies aname, for example (ADF-VIEW), for the classification of a stack segmentthat is subsequently split into constituent segments, the technique canderive the classification names such as (ADF-VIEW-1), (ADF-VIEW-2),(ADF-VIEW-1-1), etc., for the constituent segments from the name(ADF-VIEW) of the coalescing segment.

Tacit knowledge can assist in creating and maintaining a knowledge baseof thread dependency relations, which are used to correlate incidencesacross services and servers under a problem to assist in root causeanalysis. The thread dependency relations, such as [(ADF Web ServiceInvocation, HTTP-Client)→(ADF Web Service, ADF-BC)] and [(ADF-BC,DATABASE Operation)→(Database, Fusion DB)], are defined in terms of thestack segment names assigned by tacit knowledge.

Roll-Up and Drill-Down of Thread or Stack Segment Intensity Statistics

This classification scheme supplies many dimensions for roll-up anddrill-down statistical analysis. One interesting statistics is theintensity of a class of threads or stack segments. Assuming a Poissondistribution for arrivals, the expected intensity ρ (the expected numberof arrivals during a time interval corresponding to the expectedresponse time τ) is related to the expected response time τ and thearrival rate λ by Little's formula:ρ=λ·τ

The average intensity of a class of threads or stack segments can bemeasured from a series of thread dump samples taken regularly, forexample every 1 minute. Given a constant arrival rate λ, the averageintensity of the threads or stack segments ρ is proportional to theaverage response time τ of the threads or stack segments. The arrivalrate can be assumed not to change during a short time interval—e.g., a15 minutes time interval for a seasonal index. Holt-Winter forecastingand seasonal trending filter can track the seasonal factor for eachseasonal index over many seasonal cycles. If the intensity of a sample,adjusted by a seasonal factor for a seasonal index, spikes above theaverage intensity then it indicates that the threads are stuck longerthan the average response time. An outlier filter can detect this as ananomaly.

The intensity of a class of threads or stack segments (invoking acertain operation) in each thread dump can be a measure of the number ofarrivals of the operation within the expected length of sample timewindow. Intensity provides an indirect measurement of the expectedlength of the sample time windows.

The thread or stack segment intensity statistics implies that the systemwill tend to see the stack traces for threads or stack segments thathave a combination of high arrival rate and long response time. Threadsor stack segments with intensities smaller than 1 (fractional valuessuch as 0.05) can be detected by counting the occurrences of thecorresponding stack traces over a sufficient number of thread dumps. Forexample, a class of threads or stack segments with arrival rate of 0.5per second and expected response time of 0.1 second will have expectedthread or stack segment intensity of 0.05 per thread dump. An intensityof 0.05 per thread dump means that on average one occurrence of thestack trace for this class of threads or stack segments should bedetectable in 20 thread dumps. If each thread dump represents a sampletime window of expected length τ=0.1 second, then 20 thread dumps add upto a sample time window of expected length 20·τ=2 seconds. Thus theexpected number of occurrences of this class of threads or stacksegments in a 2 seconds window is given by 20·γ·τ=1.

For Poisson processes, the above reasoning is valid as long as thesample time windows are non-overlapping. To ensure that the sample timewindows are non-overlapping, the sampling interval must be significantlygreater than the expected response time τ of a given class of threads.Disclosed herein is an anti-aliasing method, which detects the stuckthreads that are already counted in the previous sample time windows, toensure that the system counts only those threads that arrive within thecurrent sample time window. This keeps the sample time windowsnon-overlapping. If the thread is not stuck, it is still possible for alingering thread to appear as different subclasses in consecutive threaddumps. For example, an ADF Application thread may be counted multipletimes as (ADF Application, ADF-MDS) in one thread dump and (ADFApplication, ADF-BC) in another thread dump. Embodiments of theinvention avoid counting the lingering threads more than once to ensurethat the sample time windows are independent. The lingering threads canbe detected for anti-aliasing if the applications among the rootclasses, such as the servlet filter that sets up the execution contextof the thread, append an epoch counter in the thread names. The epochcounter can be correlated to the ECID of the execution context of thethread.

Nesting Thread or Stack Segment Intensity Statistics

Nested subclasses can be represented as states in a state machine. Forexample, example class (ADF Application) can contain example subclass(ADF Application, ADF-BC), which can contain example subclass (ADFApplication, ADF-BC, Database Operation). Each of these three nestedsubclasses can be represented as a state in a state machine.

Threads in each of the subclasses can have various intensities. Forpurposes of the discussion below, ρ(ADF) denotes the intensity of (ADFApplication) threads, ρ(ADF-BC) denotes the intensity of (ADFApplication, ADF-BC) threads, and ρ(ADF-BC-JDBC) denotes the intensityof (ADF Application, ADF-BC, Database Operation) threads. The intensityof the (ADF Application, ADF-BC, Database Operation) threads areincluded in the intensity of the (ADF Application, ADF-BC) threads,which is in turn included in the intensity of the (ADF Application)threads.

The intensity of the (ADF Application, ADF-BC, Database Operation)threads represents the number of arrivals of the Database Operationswithin the interval τ(ADF-BC-JDBC). These arrivals of Database Operationare observable as JDBC stack frames in the thread dumps taken beforetheir departures. The arrival and departure of a Database Operation canbe represented as state transitions to “Begin Database Operation” and“End Database Operation” states in the state machine. The intensity,i.e. expected number of arrivals, depends on the density of the arrivalpoints and the expected length of time interval between “Begin DatabaseOperation” and “End Database Operation” states. The intensity ofDatabase Operation will spike if the density of arrival points λ and/orthe expected response time τ(ADF-BC-JDBC) of the Database Operationspike. Assuming that the density of arrival points λ is constant withina seasonal index, a spike in intensity can be attributed to the DatabaseOperations getting stuck longer than expected. The intensities of thethree nested classes of threads can be rolled up along the chain:ρ(ADF-BC-JDBC)⊂ρ(ADF-BC)⊂ρ(ADF).Splitting Thread or Stack Segment Intensity Statistics

A fraction of the threads invoking the ADF-BC library might need toperform data access using JDBC while the rest of the threads may accessthe data in the cache. The state transition diagram for this scenariocan be represented by the splitting of a Poisson process into twoPoisson sub-processes. If λ(ADF-BC) denotes the arrival density of theADF-BC thread, λ(ADF-BC-JDBC) denotes the density of the ADF-BC-JDBCthread, and λ(ADF-BC-cache) denotes the density of the ADF-BC threadsthat skip the JDBC operation, then the sum of two Poisson processesADF-BC-JDBC and ADF-BC-cache is a Poisson process ADF-BC with densityand intensity given byλ(ADF-BC)=λ(ADF-BC-JDBC)+λ(ADF-BC-cache)ρ(ADF-BC)=ρ(ADF-BC-JDBC)+ρ(ADF-BC-cache)

If p denotes the percentage of λ(ADF-BC) that invokes the JDBCoperation, thenλ(ADF-BC-JDBC)=p·λ(ADF-BC)λ(ADF-BC-cache)=(1−p)·λ(ADF-BC)

If the corresponding expected response times are denoted by τ(ADF-BC),τ(ADF-BC-JDBC), and τ(ADF-BC-cache), thenρ(ADF-BC)=ρ(ADF-BC-JDBC)+ρ(ADF-BC-cache)ρ(ADF-BC)=λ(ADF-BC-JDBC)·τ(ADF-BC-JDBC)+λ(ADF-BC-cache)·τ(ADF-BC-cache)λ(ADF-BC)·τ(ADF-BC)=p·λ(ADF-BC)·τ(ADF-BC-JDBC)+(1−p)·λ(ADF-BC)·τ(ADF-BC-cache)τ(ADF-BC)=p·τ(ADF-BC-JDBC)+(1−p)·τ(ADF-BC-cache)

The intensities of the nested classes of threads can be rolled up alongdirected chains:ρ(ADF-BC-JDBC)⊂ρ(ADF-BC)⊂ρ(ADF)ρ(ADF-BC-cache)⊂ρ(ADF-BC)⊂ρ(ADF).Merging Thread or Stack Segment Intensity Statistics

Two example classes (Customer Server, HTTP Servlet, ADF Application) and(Customer Server, Outlook Connector, ADF Application) of threads can bemerged under an example super-class (Customer Server, ADF Application).The intensity statistics of ADF Application includes requests throughHTTP Servlet and Outlook Connector. It may be assumed that the responsetime of the ADF Application is the same for HTTP Servlet and OutlookConnector channels.τ(ADF)=τ(HTTP-ADF)=τ(Outlook-ADF)

The arrival rate of the merged process isλ(ADF)=λ(HTTP-ADF)+λ(Outlook-ADF)

The intensity of the merged process is

$\begin{matrix}{{\rho({ADF})} = {{\lambda({ADF})} \cdot {\tau({ADF})}}} \\{= {\left( {{\lambda\left( {{HTTP} - {ADF}} \right)} + {\lambda\left( {{Outlook} - {ADF}} \right)}} \right) \cdot {\tau({ADF})}}} \\{= {{{\lambda\left( {{HTTP} - {ADF}} \right)} \cdot {\tau\left( {{HTTP} - {ADF}} \right)}} +}} \\{{\lambda\left( {{Outlook} - {ADF}} \right)} \cdot {\tau\left( {{Outlook} - {ADF}} \right)}} \\{= {{\rho\left( {{HTTP} - {ADF}} \right)} + {\rho\left( {{Outlook} - {ADF}} \right)}}}\end{matrix}$Segmenting Thread or Stack Segment Intensity Statistics

The example class (ADF Application) of threads can include three examplesubclasses of threads (ADF Application, ADF-BC), (ADF Application,ADF-MDS), and (ADF Application, ADF-SECURITY). These three subclasses ofthreads represent a sequence of invocations of component states by thecomposite state. The corresponding thread intensities can be denoted inthe following manner. ρ(ADF-BC) denotes the intensity of (ADFApplication, ADF-BC) threads; ρ(ADF-MDS) denotes the intensity of (ADFApplication, ADF-MDS) threads; ρ(ADF-SECURITY) denotes the intensity of(ADF Application, ADF-SECURITY) threads.

The expected response time of ADF Application can be segmented into theresponse times of ADF-BC, ADF-MDS, and ADF-SECURITY invocations:τ(ADF)≈τ(ADF-BC)+τ(ADF-MDS)+τ(ADF-SECURITY)

The thread or stack segment intensity of the ADF Application can besegmented by the component response times:ρ(ADF)≈λ(ADF)·τ(ADF)≈λ(ADF)·(τ(ADF-BC)+τ(ADF-MDS)+τ(ADF-SECURITY))

Since the arrival density λ(ADF) is the same for all 3 subclasses, theintensity of the super class threads or stack segments is composed ofthe intensity of 3 subclasses of threads or stack segments:ρ(ADF)≈λ(ADF-BC)·τ(ADF-BC)+λ(ADF-MDS)·τ(ADF-MDS)+λ(ADF-SECURITY)·τ(ADF-SECURITY)≈ρ(ADF-BC)+ρ(ADF-MDS)+ρ(ADF-SECURITY)

Hence, the expected intensity of the composite state can beproportionally attributed to the expected intensity of the componentstates.

Multiplying Arrival Rate in Thread or Stack Segment Intensity Statistics

Supposing that ADF-JAAS denotes the access control check that may beinvoked multiple times from any stack frame in ADF-BC, ADF-MDS, andADF-SECURITY states, the projection (ADF Application, ADF-JAAS)represents the state of a thread performing access control check. Itmerges the intensity statistics of the following three subclasses (ADFApplication, ADF-BC, ADF-JAAS), (ADF Application, ADF-MDS, ADF-JAAS),and (ADF Application, ADF-SECURITY, ADF-JAAS).

Depending on the expected number of times each ADF Application threadmay invoke an access control check, the arrival rate λ(ADF-JAAS) of thestate (ADF Application, ADF-JAAS) can be a multiple of the arrival rateλ(ADF) for ADF Application. In the following equations, w denote themultiplicative factor:λ(ADF-JAAS)=ω·λ(ADF)

The arrival process of ADF thread samples is a Poisson arrival process.The arrival process of ADF-JAAS thread samples is not a Poisson arrivalprocess because multiple arrivals of ADF-JAAS thread samples can bedependent on arrival of one ADF thread sample. However, we can stillapply Little's formula ρ=λ·τ, which holds for any mean-ergodic arrivalprocess. We maintain that the arrival process of ADF-JAAS thread samplesis mean-ergodic since the arrivals of any two ADF-JAAS thread samplesare independent if the interval between their arrival times issufficiently large. The intensity of the thread or stack segment (ADFApplication, ADF-JAAS) is, therefore, given by:

$\begin{matrix}{{\rho\left( {{ADF} - {JAAS}} \right)} = {{\lambda\left( {{ADF} - {JAAS}} \right)} \cdot {\tau\left( {{ADF} - {JAAS}} \right)}}} \\{= {\omega \cdot {\lambda({ADF})} \cdot {\tau\left( {{ASF} - {JAAS}} \right)}}}\end{matrix}$

If λ(ADF)=ρ(ADF)/τ(ADF) is substituted, then the following equation isproduced:ρ(ADF-JAAS)=ω·[τ(ADF-JAAS)/τ(ADF)]·ρ(ADF)

The intensity of the thread or stack segment (ADF Application, ADF-JAAS)is a factor ω·τ(ADF-JAAS)/τ(ADF) of the intensity of the thread or stacksegment (ADF Application). For example, if each request to ADFApplication performs 5 access control checks, i.e. ω=5, and the expectedresponse time of ADF-JAAS constitutes 10 percent of the expectedresponse time of ADF Application, i.e. τ(ADF)=10·τ(ADF-JAAS), then theaverage intensity of ADF-JAAS thread or stack segment will constitute 50percent of the intensity of the ADF Application threads or stacksegments. It can be expected thatρ(ADF-JAAS)⊂ρ(ADF)Hence,ω·τ(ADF-JAAS)/τ(ADF)<1Impedance Matching by Thread or Stack Segment Intensity Statistics

An example may be considered in which there are communication channelsbetween a two-node CRM Domain Sales Server cluster and a two-node CRMDomain Order Capture Server cluster. These channels can support theclient-server dependency relation between a class of threads in Salesservice and a class of threads in Order Capture service:

-   -   (CRM Domain, Sales Server, ADF Application, ADF Web Service        Invocation)→(CRM Domain, Order Capture Server, ADF Web Service,        ADF-BC)

The corresponding thread intensities can be denoted as follows:ρ(ADF-HTTPClient) denotes the intensity of (CRM Domain, Sales Server,ADF Application, ADF Web Service Invocation) threads in a Sales servercluster; ρ(ADF-HTTPClient(i)) denotes the intensity of (CRM Domain,Order Capture Server, ADF Web Service, ADF-BC) threads in Sales servernode i; ρ(WebService-ADF-BC) denotes the intensity of (CRM Domain, OrderCapture Server, ADF Web Service, ADF-BC) threads in an Order Captureserver cluster; ρ(WebService-ADF-BC(i)) denotes the intensity of (CRMDomain, Order Capture Server, ADF Web Service, ADF-BC) threads in OrderCapture server node i.

Given that there are n and m number of nodes, respectively, in the SalesServer and Order Capture Server clusters:

$\rho_{({{ADF} - {HTTPClient}})} = {\sum\limits_{i = 1}^{n}\rho_{({{ADF} - {{HTTPClient}{(i)}}})}}$$\rho_{({{WebService} - {ADF} - {BC}})} = {\sum\limits_{i = 1}^{m}\rho_{({{WebService} - {ADF} - {{BC}{(i)}}})}}$

If the communication channels between the Sales Server and Order CaptureServer do not introduce any impedance mismatch to the Web Serviceinvocation from Sales service to Order Capture service, then:ρ(ADF-HTTPClient)=ρ(WebService-ADF-BC)

If a discrepancy of the intensities of client and server threads isobserved, it can be attributed to the congestion in the communicationchannels. If ρ(channel) denotes the traffic intensity in thecommunication channels between the client and server threads, then:ρ(ADF-HTTPClient)=ρ(WebService-ADF-BC)+ρ(channel)

When the arrival and departure rates are at equilibrium:λ(ADF-HTTPClient)=λ(WebService-ADF-BC)=λ(channel)andτ(ADF-HTTPClient)=τ(WebService-ADF-BC)+τ(channel).

The capacity of the communication channels can be increased to reducethe impedance mismatch between the client service and server servicethat contributes latency τ(channel) to the response timeτ(ADF-HTTPClient) of the client.

Saturation of Intensity

The thread or stack segment intensity is a measure of the expectednumber of stack traces of a class of threads or stack segments in athread dump. The thread intensity will increase with the increase inarrival rate and expected response time of the given class of threads orstack segments.

Some systems impose a limit on the maximum number of threads availableto run a given class of threads. When this limit is reached, the threador stack segment intensity becomes saturated (maxed out) and thestatistics will no longer reflect the relation ρ=λ·τ even though thearrival rate or response time may continue to increase. Embodiments ofthe invention are able to recognize when the saturation points arereached. Embodiments of the invention include the Holt-Winter tripleexponential moving average filter that extrapolates the growth trend ofthe intensity. These embodiments can recognize the saturation pointswhen they detect a series of outliers when the intensity levels off at amaximum and stops following the projected growth trends.

If the system does not impose a limit on the maximum intensity, it ispossible for the thread or stack segment intensity to grow out of boundand cause out of memory errors in the system. This condition can bepredicted by Holt-Winter triple exponential moving average filter as anendpoint.

Anti-Aliasing

The Poisson counting process requires that the sample windows arenon-overlapping and independent. This requires that stuck threads andlingering threads are not counted more than once. The system uses theThreadInfo.getThreadId( ) and ThreadMXBean.getThreadCpuTime(long id) injava.lang.management API to monitor the central processing unit (CPU)time of each thread. The technique infers that the thread is stuck ifthe CPU time of the thread does not change since the previous threaddump. The technique also tracks the number of consecutive thread dumpsin which this thread is detected as stuck. These variables can bemaintained in a ThreadAntiAliasingInfo data structure.

If the thread is lingering but not stuck, the CPU time will change. Todetect lingering threads, the anti-aliasing technique cooperates withthe classes such as the servlet filters among the root frames of thestack trace to append the epoch counter to the name of the thread usingthe java.lang.Thread setName application programming interface (API). Ifthe thread name is the same as the previous thread name recorded in theThreadAntiAliasingInfo, the technique infers that the thread has alreadybeen counted. The epoch information in the thread name provides ananti-aliasing solution when the same thread in a thread pool is observedas an alias when it is reused for a new epoch.

If stuck or lingering threads are consistently detected for a certainclass of threads, the technique can adapt the sampling interval (byusing every Nth thread dump) until the expected length of sample timewindows for this class of threads is less than N*M minutes, where M isthe sampling time interval.

Hypertension and Hypotension States

A JVM can be instrumented to detect stuck threads that may represent ahypertension state of the system. Hypertension states can be diagnosedas congestions in the downstream paths towards the database or backendservers. However, embodiments of the invention can also detect thehypotension states (dehydration) when the requests are not gettingthrough to the server due to congestions in the upstream path. Thelatter condition cannot be detected by the regular JVM instrumentationfor stuck thread detection. The outlier detection using thread or stacksegment intensity can detect both hypertension and hypotension statessymmetrically.

If the maximum number of threads is N and the expected thread or stacksegment intensity is ρ, then the probability of saturation is given bythe Poisson distribution:

${P\left\{ {k \geq N} \right\}} = {1 - {\sum\limits_{k = 0}^{N - 1}{{\mathbb{e}}^{- \rho}\frac{\rho^{k}}{k!}}}}$

If the expected thread or stack segment intensity is 5 and the maximumnumber of threads or stack segments is 10, the probability of saturatingthe thread or stack segment intensity is 0.032, which means that 3.2% ofthe thread dumps will show intensity saturated at 10. Supposing theexpected thread or stack segment intensity is 50 and the maximum numberof threads or stack segments is 100, the probability of saturating thethread or stack segment intensity at 100 is 3.2E-10. With thisprobability the normal cause of saturation is unlikely and the thread orstack segment intensity saturation must be due to abnormal causes suchas severe congestions downstream to the server. It is equally unlike,with probability of 5.0E-10, for thread or stack segment intensities todrop below 14 unless the server is severely dehydrated due tocongestions upstream to the server.

Intensity-Driven Classification of Stack Frames

Generally, after the thread dumps are sampled a sufficient number oftimes over some period, the detection of stack traces of low intensitythreads or stack segments can be expected. Sometimes the stack frameswhose intensities are too low to be detected even after long periods ofthread dumps can be detected due to system glitches or regression ofsoftware upgrades. Nevertheless, there can be very rare stack framesthat remain undetected and unclassified. Embodiments of the inventioncan continuingly classify new traces of stack frames when they aredetected after a sufficient number of thread dumps or after systemglitches that cause their intensities to spike. Disclosed herein is aclassification scheme which is driven by the intensity measures of thestack frames.

The system tracks the intensity of each individual stack frame as wellas the predecessor and successor stack frames that appear adjacent tothe stack frame in the stack traces. The system assigns the sameclassification to adjacent stack frames that appear with the sameintensity—i.e., the stack frames that always appear together as anordered array in the stack traces. For example, the scheme will assignthe (JDBC-Execute) class to the following stack frames that alwaysappear together as an ordered array with the same intensity:

oracle.jdbc.driver.T4CCallableStatement.executeForRows-(T4CCallableStatement.java:991)oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout-(OracleStatement.java:1285)oracle.jdbc.driver.OraclePreparedStatement.executeInternal-(OraclePreparedStatement.java:3449)oracle.jdbc.driver.OraclePreparedStatement.execute-(OraclePreparedStatement.java:3550)oracle.jdbc.driver.OracleCallableStatement.execute-(OracleCallableStatement.java:4693)oracle.jdbc.driver.OraclePreparedStatementWrapper.execute-    (OraclePreparedStatementWrapper.java:1086)

As discussed above, the intensity ρ(ADF) of the ADF Application can beapproximated by segmenting it into 3 components ρ(ADF-BC), ρ(ADF-MDS),and ρ(ADF-SECURITY):ρ(ADF)≈ρ(ADF-BC)+ρ(ADF-MDS)+ρ(ADF-SECURITY)

To improve the model, the intensity of miscellaneous ADF applicationstates that are disjoint from ADF-BC, ADF-MDS, and ADF-SECURITY statescan be rolled up under (ADF Application, ADF-misc) class. The laststate's intensity, ρ(ADF-misc), may be negligible compared to theintensities of the 3 major components:ρ(ADF)=ρ(ADF-BC)+ρ(ADF-MDS)+ρ(ADF-SECURITY)+ρ(ADF-misc)

It is possible for the intensity of a subclass of threads or stacksegments under the (ADF Application, ADF-misc) class to spike due tosystem glitches. For example, a file system glitch can cause some ADFApplication threads to get stuck in file write operation:

java.io.FileOutputStream.writeBytes(Native Method)java.io.FileOutputStream.write(FileOutputStream.java:260) . . .java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)org.apache.log4j.helpers.QuietWriter.flush(QuietWriter.java:57) . . .org.apache.log4j.WriterAppender.append(WriterAppender.java:159) . . . atoracle.adf.View.process(View.java:632)

Supposing that the intensity of this stack frame spikes above athreshold, a new state (ADF Application, ADF-View-misc) of ADFApplication threads can be classified. For the duration of the spike,the intensity ρ(ADF) of the ADF Application can be decomposed into 4components:ρ(ADF)=ρ(ADF-BC)+ρ(ADF-MDS)+ρ(ADF-SECURITY)+ρ(ADF-View-misc)

The stack frames performing file write operation may occur on top of theADF-View-misc stack frames as well as the ADF-BC, ADF-MDS, andADF-Security stack frames. Over time the system may detect the intensityof the file write operation stack frames diverging from the intensity ofother stack frames in ADF-View-misc. Separating the intensity of thedifferent groups of the stack frames will result in the newclassification (File Write Operation) and segmenting of theclassification (ADF-View-misc) into (ADF-View, File Write Operation).The previous classification (ADF-View-misc) is subsumed under the new(File Write Operation) and (ADF-View) classes. The new (File WriteOperation) class also intersects with (ADF-BC), (ADF-MDS), and(ADF-Security) classes to form new subclasses (ADF-BC, File WriteOperation), (ADF-MDS, File Write Operation), and (ADF-Security, FileWrite Operation), whose intensities are also spiking. Thus the intensitydrives the classification of (File Write Operation) and (ADF-View)classes.

The system may solicit human tacit knowledge to classify stack framesand to assign the classifications to the proper dimensions. In certainembodiments of the invention, an inductive learning process can assignthe new classes to the dimensions that the system has already defined.For example, by analyzing the intensity and adjacency statistics of(ADF-BC, File Write Operation), (ADF-MDS, File Write Operation),(ADF-Security, File Write Operation), and (ADF-View, File WriteOperation) stack traces, the inductive learning process may assign the(File Write Operation) class to the Operation dimension and the(ADF-View) class to the Library dimension as shown below:Operation=(Database Operation)|(LDAP Operation)|(Web ServiceInvocation)|(File Write Operation)Library=(ADF-BC)|(ADF-MDS)|(ADF-SECURITY)|(ADF-VIEW)

To enable the classification of each individual stack frame in the stacktraces, the system maintains the number of occurrences of a stack framein the current thread dump (numOfOccur), total number of occurrences inall thread dumps (totalNumOfOccur), a list of predecessors, a list ofsuccessors, and a coalescing segment using a StackFrameInfo datastructure. A classMethodLineNumber variable in the StackFrameInfo datastructure holds a string, such as “weblogic.work.ExecuteThread run(ExecuteThread.java:213)” that represents a stack frame in the threaddump. The numOfOccur holds the number of occurrences of the string“weblogic.work.ExecuteThread run (ExecuteThread.java:213)” in thecurrent thread dump. An intensity measure is a derived variable given byintensity=totalNumOfOccur/totalNumOfDumps.

If an existing classification, such as (ADF-View-misc), is split intotwo new classifications, such as (ADF-View, File Write Operation), thenew classifications are maintained as the first segment and secondsegment of the original classification. The original classification isset as the coalescing segment of the new classifications. The stackframes that belong to the classification are also maintained as elementsin the classification. The name of the classification and dimension areoptional and can be specified by tacit knowledge. The coalescingsegment, first constituent segment, second constituent segment, andelements of a stack segment classification are maintained using theStackSegmentInfo data structure.

A stack segment that can repeat a variable number of times due to arecursive program construct is also classified by a StackSegmentInfo.This recursive StackSegmentInfo can appear in different contexts, i.e.it can occur in more than one class of coalescing segments or threads.The RecursiveSegmentInfo data structure is used to represent therecursive occurrence of a StackSegmentInfo in each context to record thedepth of recursion (numOfRecur) in a RecursiveSegmentInfo datastructure. The RecursiveSegmentInfo can also constitute the mutualrecursion segments in the visitor design pattern for tree traversal. Forexample, a simple mutual recursion construct will look like (A, B)^(n)where A and B are invoking each other. The visitor design pattern, inwhich mutual recursion involves different types of tree nodes {A1, A2,A3} and different types of visitor nodes {B1, B2, B3}, will look like((A1, B1), (A3, B3)², (A2, B2), (A3, B3)⁵, . . . ). The mutual recursionsegment, for example the segment (A3, B3)^(n), can occur any number oftimes at different positions in the stack trace. Each position isrepresented by an instance of RecursiveSegmentInfo.

The technique splits the stack traces of a thread into a sequence ofleaf-level stack segments and then coalesces the leaf-level stacksegments until it gets a sequence of top-level coalesced stack segments,each of which can contain a binary tree structure representing ahierarchy of constituent segments. This representation forms a signaturefor classifying an equivalence class of threads and reduces the timecomplexity of pattern matching a thread against a large repertoire ofthreads. Thread classification information is maintained using theThreadClassificationInfo data structure.

Embodiments of the invention also filter the seasonal trend for theintensity for each classification of stack frames. A SeasonalTrendInfodata structure contains some of the filter variables. A rawIntensityvariable in SeasonalTrendInfo records the intensity of a stack frame, astack segment, or a thread class in the current thread dump. If a stacksegment is a leaf level segment (no sub-segments), then numOfOccur willbe the same as numOfOccur of each StackFrameInfo element in the stacksegment. The filter updates the smoothed intensity and smoothedintensity growth rate to forecast the growth trend of the intensity. Thenormalized residual of the forecasted intensity can be used as a filterfor detecting outliers, which represent when the measured intensity isdeviating from the expected intensity. This condition can representhypertension or hypotension states of the services.

An Example Scenario of Intensity-Driven Classification

Supposing that a system has classified an array of stack frames in astack trace, a list of stack frames can make up elements of a stacksegment (A). Each stack frame element maintains the intensity, number ofoccurrences, predecessors, and successors information. The stack framesin this class may have, for example, the same intensity of 1.3 after 10thread dumps.

After 100 thread dumps, the intensities of the stack frames in the stacksegment (A) might diverge into three groups, with the intensity of thebottom 3 stack frames increasing to 2.5, the intensity of the top 3stack frames increasing slightly to 1.33, and the intensity of themiddle stack frame, which serves as a glue frame, staying around 1.3. Asthe intensities diverge, the system splits the stack segment (A) intotwo constituent stack segments (A-1) and (A-2), and again splits thestack segment (A-2) into (A-2-1) and (A-2-2). The intensity of themiddle stack frame (A-2-1) is representative of the intensity of thestack segment (A), i.e. A=(A-1, A-2-1, A-2-2). The intensities of (A-1)and (A-2-2) diverges because of their occurrences in the stack traces(A-1, AC, C) and (B, BA, A-2-2), where (AC) and (BA) represent glueframes that, respectively, connect (A-1) with (C) and (B) with (A-2-2).A particular stack frame can have multiple successors and multiplepredecessors.

When the technique detects a divergence of intensities among the stackframes of a stack segment, it splits the stack frame elements among thenew constituent stack segments. For example, constituent stack segments(A-1), (A-2), (A-2-1) and (A-2-2), each of which directly or indirectlyrefers to the stack segment (A) as the coalescing segment, can beproduced from such a split. In the example, the elements in the stacksegment (A) can be split into elements in stack segment (A-1) andelements in stack segment (A-2). The stack segment (A-2) can in turn besplit into elements in stack segment (A-2-1) and elements in stacksegment (A-2-2). The stack frames are updated to refer to thecorresponding leaf-level coalescing segment. Coalescing segment forvarious elements can be updated to reflect the new stacks to which thoseelements belong.

It is possible to observe variations of a stack segment that differ onlyby the depth of recursion of a constituent segment. Assuming that theintensities of certain segments remain the same, but the intensity ofother segments diverge due to an arbitrary depth of recursion, thesystem can split the original segment into constituent segments. Theelements of the original stack segment can contain a variable number ofthe stack segments, which is classified by A-2-1. Consequently, theconstituent segments of the original stack segment will contain avariable number of the segment A-2-1. Any stack trace that matches aspecified pattern can be identified by the same classificationsignature. The recursive segment can point to the stack segment A-2-1 asthe classification of the first constituent segment of the coalescingsegment A-2.

The system can create one copy of the SeasonalTrendInfo data in stacksegment (A) for each new stack segment (A-1), (A-2), (A-2-1), and(A-2-2) to use as initial filter states. Subsequently theSeasonalTrendInfo data for (A-1), (A-2), (A-2-1), and (A-2-2) can beupdated independently.

Thread Class Dependency Information Model

The thread classification and intensity measurement algorithm can bebootstrapped with a knowledge base that provides the dependencyinformation between thread classes. The dependency information can beused to estimate traffic intensity in the communication channels betweenthe thread classes. They can also relate the events and incidences fromtwo or more thread classes in different parts of the FA servers in aproblem container for root cause analysis. For example, assuming thethread class dependency (CRM Domain, Sales Server, ADF Application, ADFWeb Service Invocation)→(CRM Domain, Order Capture Server, ADF WebService, ADF-BC), then if Sales Server and Order Capture Server in an FApod simultaneously report hypotension state of the client threads andhypertension state of the server threads, these events can be collectedunder an incidence. If these events occur often enough, a ticket can beopened and assigned to an owner to analyze possible impedance mismatchin the communication channels between the Sales Server and Order CaptureServer clusters. The owner may assess these incidences as an impedancematching problem and submit a service request.

Typically the dependency information is specified at super class levels.For example, the dependency (ADF Web Service Invocation)→(ADF WebService, ADF-BC) captures a general pattern of service invocationsbetween ADF services distributed across WebLogic domains and servers inan FA pod. This abstract dependency includes the dependency (CRM Domain,Sales Server, ADF Application, ADF Web Service Invocation)→(CRM Domain,Order Capture Server, ADF Web Service, ADF-BC). In another situation,the abstract dependency patterns (ADF-BC, DATABASE Operation)→(DATABASE,Fusion DB) and (ADF-SECURITY, DATABASE Operation)→(DATABASE, OIM-APM DB)enable differential diagnosis of a hypertension problem of JDBC threadsto isolate the problem in one of the database servers.

An information model can map the dependencies between thread classes.ThreadClassDependencyInfo can represent many-to-one mappings from clientthread classes to server thread classes. ThreadClassInfo can specify aclass of threads by a tuple of stack segments. For example, (ADF-BC,DATABASE Operation) is a tuple of stack segments (ADF-BC) and (DATABASEOperation). The class (CRM Domain, Order Capture Server, ADF WebService, ADF-BC, DATABASE Operation) is a subclass of (ADF-BC, DATABASEOperation). ThreadClassificationInfo contains a list of stack segmentsthat represent a signature for classifying threads. The technique canperform a single depth first traversal of the binary tree (from bottomto top of the stack frames), extracting the thread class objects fromthe partOfThreadClasses attribute of the stack segments objects visited,and match the stack segments in ThreadClassInfo against the stacksegments in the classification signature. When a thread class ismatched, the client or server thread class is included in the alerts orincidence reports.

Applying Thread or Stack Segment Intensity Analytics

FIGS. 1A-B show a flow diagram that illustrates an example of atechnique for applying thread or stack segment intensity analytics,according to an embodiment of the invention. The technique maintains astack frame information map, a stack segment information map, a threadclassification map, and an anti-aliasing information map. The stackframe information map, stack segment information map and threadclassification map are comprised of the stack frame, stack segment, andthread classifications extracted from the threads dump samples collectedup to a point in time (collected in a series of sampling times precedinga sampling time). These maps can be optionally bootstrapped with thestack frame, stack segment and thread classifications extracted from thethread dumps in historical archives. The anti-aliasing information maprepresents the threads that are sampled in the previous threads dump.The thread anti-aliasing information map is used to identify the threadsin the threads dump of the current sampling time that are alreadyencountered in the threads dump of the previous sampling time. The stacktraces of the threads dump at a sampling time can be classified usingthe stack frame information map, stack segment information map, andthread classification map. These maps are part of the contexts for theprocesses depicted by the flow diagrams in FIGS. 1A-B and subsequentfigures. Referring first to FIG. 1A, in block 102, the current samplingtime arrives.

In block 104, the current sampling time is set to be the next samplingtime, a point in time when a sampling time interval has elapsed. Inblock 106, a thread dump of all threads at the current sampling time isobtained. For example, the thread dump for the current sampling time canbe obtained from java.lang.management.ThreadMXBean. In block 108, athread dump counter is incremented.

For threads dump at each sampling time, a number of occurrences counterof each stack frame information item in the stack frame information mapis reset to zero such that the counter can be used to count the numberof occurrences of the stack frame in the current thread dump. To achievethis, in block 110 a determination is made whether an unprocessed stackframe information item in the stack frame information map remains to beprocessed. If so, then control passes to block 112. Otherwise, controlpasses to block 116.

In block 112, the current stack frame information item is set to be thenext unprocessed stack frame information item in the stack frameinformation map. In block 114, a number of occurrences for the currentstack frame information item is set to zero. Control passes back toblock 110.

For threads dump at each sample time, a number of occurrences counter ofeach stack segment information item in the stack segment information mapis reset to zero such that the counter can be used to count the numberof occurrences of the stack segment in the current thread dump. Toachieve this, in block 116 a determination is made whether anunprocessed stack segment information item in the stack segmentinformation map remains to be processed. If so, then control passes toblock 118. Otherwise, control passes to block 122 on FIG. 1B.

In block 118, the current stack segment information item is set to bethe next unprocessed stack segment information item in the stack segmentinformation map. In block 120, a number of occurrences for the currentstack segment information item is set to zero. Control passes back toblock 116.

For threads dump at each sample time, a number of occurrences counter ofeach thread classification information item in the thread classificationinformation map is reset to zero such that the counter can be used tocount the number of occurrences of the thread in the current threaddump. To achieve this Referring now to FIG. 1B, in block 122, adetermination is made whether an unprocessed thread classificationinformation item in the thread classification information map remains tobe processed. If so, then control passes to block 124. Otherwise,control passes to block 128.

In block 124, the current thread classification information item is setto be the next unprocessed thread classification information item in thethread classification information map. In block 126, a number ofoccurrences for the current thread classification information item isset to zero. Control passes back to block 122.

In block 128, stack frame statistics for the thread dump for the currentsampling time are updated. A technique for updating the stack framestatistics for the thread dump for the current time interval isdisclosed below with reference to FIGS. 2A-B. In block 130, a set ofthread classes is determined by classifying threads and stack segmentsfrom the thread dump for the current sampling time. A technique forclassifying threads and stack segments from the thread dump for thecurrent sampling time is disclosed below with reference to FIGS. 3A-J.

For threads dump at each sample time, a flag in each threadanti-aliasing information item in the thread anti-aliasing informationmap is checked to determine whether a classified thread occurrs in thecurrent thread dump. If the classified thread does not occur in thecurrent thread dump, it is removed from the thread anti-aliasinginformation map. To achieve this, in block 132 a determination is madewhether an unprocessed thread anti-aliasing information item remains inthe thread anti-aliasing information map. If so, then control passes toblock 134. Otherwise, control passes to block 142.

In block 134, the current thread anti-aliasing information item is setto be the next unprocessed thread anti-aliasing information item in thethread anti-aliasing information map. In block 136, a determination ismade whether a flag for the current thread anti-aliasing informationitem, indicating whether the current thread information item occurs inthe thread dump for the current sample time, is false. If so, thencontrol passes to block 138. Otherwise, control passes to block 140.

In block 138, the current thread anti-aliasing information item isremoved from the thread anti-aliasing information map. Control passesback to block 132.

In block 140, the flag for the current thread anti-aliasing informationitem is set to false. Control passes back to block 132.

In block 142, a seasonal trend filter is applied relative to the stacksegment information map for the current sample time. A technique forapplying a seasonal trend filter is disclosed below with reference toFIG. 4. Control passes back to block 102 on FIG. 1A.

Updating Stack Frame Statistics

FIGS. 2A-B show a flow diagram that illustrates an example of atechnique for updating stack frame statistics, according to anembodiment of the invention. The technique can be performed relative toa thread dump for a current sampling time, referred to above withreference to FIGS. 1A-B. Referring first to FIG. 2A, in block 202, adetermination is made whether an unprocessed thread information item inthe thread dump remains to be processed. If so, then control passes toblock 204. Otherwise, the technique illustrated in FIGS. 2A-B concludes.

In block 204, the current thread information item is set to be the nextunprocessed thread information item in the thread dump. In block 206,the current stack trace is set to be the stack trace in the currentthread information item. In block 208, a stack trace element index isreset. For example, the index can be reset by setting the index to −1.In block 210, a current stack trace element is set to be the stack traceelement at the bottom of the current stack trace.

In block 212, the stack trace element index is incremented. In block214, the current stack frame information item is set to be a stack frameinformation item (in the stack frame information map or created asnecessary) corresponding to the current stack trace element, by matchingwith a key, i.e. get a stack frame information item that has the samekey as the key of the current stack trace element. For example, a keycan be comprised of a source code statement, a line number, an objectcode address, or combination of these.

In block 216, a determination is made whether the current stack traceelement is at the bottom of the current stack trace. For example, if thestack trace element index is equal to zero, then this can indicate thatthe current stack trace element is at the bottom of the current stacktrace. If the current stack trace element is at the bottom of thecurrent stack trace, then control passes to block 218. Otherwise,control passes to block 220.

In block 218, the current stack frame information item is marked asbeing a bottom frame in the stack frame information map. This may beaccomplished by adding a constant stack frame information item such as“FRAME_FLOOR” to a predecessors list attribute of the current stackframe information item. The current stack frame information item can bealso added to the successors list attribute of the “FRAME_FLOOR.”Control passes to block 224 on FIG. 2B.

In block 220, a determination is made whether the current stack traceelement is at the top of the current stack trace. For example, if thestack trace element index is equal to one less than the size of thecurrent stack trace, then this can indicate that the current stack traceelement is at the top of the current stack trace. If the current stacktrace element is at the top of the current stack trace, then controlpasses to block 222. Otherwise, control passes to block 224 on FIG. 2B.

In block 222, the current stack frame information item is marked asbeing a top frame in the stack frame information map. This may beaccomplished by adding a constant stack frame information item such as“FRAME_CEILING” to a successors list attribute of the current stackframe information item. The current stack frame information item can bealso added to the predecessors list attribute of the “FRAME_CEILING.”Control passes to block 224 on FIG. 2B.

Referring now to FIG. 2B, in block 224, a number of occurrencesattribute of the current stack frame information item is incremented. Atotal number of occurrences attribute of the current stack frameinformation item also can be incremented. In block 226, a previous stackframe information item, if it is not null, is added to a predecessorslist attribute of the current stack frame information item. In block228, a determination is made as to whether any stack trace elementsexist above the current stack trace element in the current stack trace.If so, then control passes to block 230. Otherwise, control passes toblock 236.

In block 230, the next stack trace element is set to be the stack traceelement that exists immediately above the current stack trace element.In block 232, the next stack frame information item is set to be a stackframe information item (in the stack frame information map) that has thesame key as the key of the next stack trace element. For example, a keycan be comprised of a source code statement, line number, or object codeaddress corresponding to a stack frame. In block 234, the next stackframe information item is added to a successors list attribute of thecurrent stack frame information item. Control passes to block 236.

In block 236, the previous stack frame information item is set to be thecurrent stack frame information item. In block 238, a determination ismade whether any stack trace element exists above the current stacktrace element in the current stack trace. If so, then control passes toblock 240. Otherwise, control passes back to block 202 on FIG. 2A.

In block 240, the current stack trace element is set to be a stack traceelement that exists immediately above the current stack trace element inthe current stack trace. Control passes back to block 212 on FIG. 2A.

Classifying Threads and their Stack Segments

FIGS. 3A-J show a flow diagram that illustrates an example of atechnique for classifying threads and the stack segments of thosethreads, according to an embodiment of the invention. The technique canbe performed relative to a specified thread dump for a current samplingtime, referred to above with reference to FIGS. 1A-B. The technique canproduce a set of thread classes, represented as a set of threadclassification information items. Referring first to FIG. 3A, in block3002, an empty set of thread classification information items iscreated, having properties that each thread in the thread dump can berepresented by a (potentially different) thread classification item inthe set, and such that equivalent threads in the thread dump arerepresented by the same thread classification item. New threadclassification items abiding by these properties can be created andadded to the set through the operations described below. In block 3004,a determination is made whether an unprocessed thread information itemin the thread dump remains to be processed. If so, then control passesto block 3006. Otherwise, control passes to block 3182.

In block 3006, the current thread information item is set to be the nextunprocessed thread information item in the thread dump. In block 3008, athread name is set to be the name of the current thread informationitem. In block 3010, a flag, which indicates whether an alias for thecurrent thread information item was found in a previous thread dump(i.e., for a previous sampling time), is set to false. In block 3012, adetermination is made whether an unprocessed thread anti-aliasinginformation item in the thread anti-aliasing information map remains tobe processed. If so, then control passes to block 3014. Otherwise,control passes to block 3024 on FIG. 3B.

In block 3014, the current thread anti-aliasing information item is setto be the next unprocessed thread anti-aliasing information item in thethread anti-aliasing information map. In block 3016, a determination ismade whether the thread name (referred to in block 3008) is the same asa name of the current thread anti-aliasing information item. If so, thencontrol passes to block 3018. Otherwise, control passes back to block3012.

In block 3018, a number of dumps attribute of the current threadanti-aliasing information item is incremented. In block 3020, a flagattribute of the current thread anti-aliasing information item, whichindicates whether an alias for that item is found in the current threaddump (i.e., for the current sampling time), is set to true. In block3022, the flag referred to in block 3010, which indicates whether analias for the current thread information item was found in a previousthread dump, is set to true. Control passes to block 3024.

Referring now to FIG. 3B, in block 3024, a determination is made whetherthe flag referred to in blocks 3010 and 3022 equals true. If so, thencontrol passes back to block 3004 on FIG. 3A. Otherwise, control passesto block 3026.

In block 3026, a new thread anti-aliasing information item correspondingto the current thread information item is created. In block 3028, a flagattribute of the new thread anti-aliasing information item, whichindicates whether an alias for that item is found in the current threaddump (i.e., for the current sampling time), is set to true. In block3030, a name of the new thread anti-aliasing information item is set tobe the thread name (referred to in block 3008). In block 3032, the newthread anti-aliasing information item is added to the threadanti-aliasing information map. In block 3034, a new fine grainedsegments list is created to track fine-grained segments of the currentthread information item. In block 3036, the current stack trace is setto be the stack trace of the current thread information item. In block3038, a stack trace element index is reset. For example, the stack traceelement index can be reset by setting a value of the index to −1. Inblock 3040, a current stack trace element is set to be the stack traceelement at the bottom of the current stack trace.

In block 3042, the stack trace element index is incremented. In block3044, the current stack frame information item is set to be a stackframe information item (in the stack frame information map) that has thesame key as the key of the current stack trace element. For example, akey can be comprised of a source code statement, line number, or objectcode address corresponding to a stack frame.

In block 3046, a determination is made whether the current stack traceelement is at the bottom of the current stack trace. For example, if thestack trace element index is equal to zero, then this can indicate thatthe current stack trace element is at the bottom of the current stacktrace. If the current stack trace element is at the bottom of thecurrent stack trace, then control passes to block 3048 on FIG. 3C.Otherwise, control passes to block 3066 on FIG. 3D.

Referring now to FIG. 3C, in block 3048, a determination is made whetherthe current stack frame information item has been classified. Forexample, this determination can be made by determining whether acoalescing segment attribute of the current stack frame information itemis equal to null. If this attribute is equal to null, then the currentstack frame information item has not been classified. If the currentstack frame information has not been classified, then control passes toblock 3050. Otherwise, control passes to block 3062.

In block 3050, a new stack segment information item is created andassigned to the value of the current stack segment information item. Inblock 3052, the value of the coalescing segment attribute (referred toin block 3048) of the current stack frame information item is set to bethe current stack segment information item. In block 3054, the currentstack frame information item is added to an element list attribute ofthe current stack segment information item. In block 3056, a newseasonal trend information item is generated. In block 3058, a value ofa trend attribute of the current stack segment information item is setto be the new seasonal trend information item. In block 3060, thecurrent stack segment information item is added to the fine grainedsegments list (referred to in block 3034). Control passes to block 3064.

In block 3062, the current stack segment information item is set to bethe value of the coalescing segment attribute (referred to in block3048) of the current stack frame information item. Control passes toblock 3064.

In block 3064, the current stack segment information item is marked asbeing a bottom segment in the current stack trace. This may beaccomplished by adding a constant stack segment information item such as“SEGMENT_FLOOR” to a predecessors list attribute of the current stacksegment information item. The current stack segment information item canbe added to a successors list attribute of “SEGMENT_FLOOR.” Controlpasses to block 3162 on FIG. 3J.

Referring now to FIG. 3D, in block 3066, a predecessor stack traceelement is set to be a stack trace element (in the current stack trace)having an index that is one less than the value of the current stacktrace element index. In block 3068, a predecessor stack frameinformation item is set to be a stack frame information item (in thestack frame information map) that has the same key as the key of thepredecessor stack trace element. For example, a key can be comprised ofa source code statement, line number, or object code addresscorresponding to a stack frame. In block 3070, a predecessor stacksegment information item is set to be the value of the coalescingsegment attribute of the predecessor stack frame information item.

In block 3072, a determination is made whether the current stack frameinformation item has been classified. For example, this determinationcan be made by determining whether a coalescing segment attribute of thecurrent stack frame information item is equal to null. If this attributeis equal to null, then the current stack frame information item has notbeen classified. If the current stack frame information item has notbeen classified, then control passes to block 3074. Otherwise, controlpasses to block 3120 on FIG. 3G.

In block 3074, a determination is made whether the predecessor stackframe information item is the last stack frame information item in theelement list attribute of the predecessor stack segment informationitem. If so, then control passes to block 3076. Otherwise, controlpasses to block 3098 on FIG. 3F.

In block 3076, a determination is made whether a successors listattribute of the predecessor stack frame information item has only oneentry that is the current stack frame information item. If so, thencontrol passes to block 3078. Otherwise, control passes to block 3082.

In block 3078, a determination is made whether a predecessors listattribute of the current stack frame information item has only one entrythat is the predecessor stack frame information item. If so, thencontrol passes to block 3080 on FIG. 3E. Otherwise, control passes toblock 3082.

Referring now to FIG. 3E, in block 3080, the value of the coalescingsegment attribute of the current stack frame information item is set tobe the predecessor stack segment information item. In block 3081, thecurrent stack frame information item is added to the elements listattribute of the predecessor stack segment information item. Controlpasses to block 3162 on FIG. 3J.

In block 3082, a new stack segment information item is created andassigned to the value of the current stack segment information item. Inblock 3084, the value of the coalescing segment attribute (referred toin block 3048) of the current stack frame information item is set to bethe current stack segment information item. In block 3086, the currentstack frame information item is added to the element list attribute ofthe current stack segment information item. In block 3088, thepredecessor stack segment information item is added to the predecessorslist attribute of the current stack segment information item. In block3090, the current stack segment information item is added to thesuccessors list attribute of the predecessor stack segment informationitem. In block 3092, a new seasonal trend information item is generated.In block 3094, a value of a trend attribute of the current stack segmentinformation item is set to be the new seasonal trend information item.In block 3096, the current stack segment information item is added tothe fine grained segments list (referred to in block 3034). Controlpasses to block 3162 on FIG. 3J.

Referring now to FIG. 3F, in block 3098, a trace segment of thepredecessor stack segment information item is split into separate firstand second new stack segment information items that occur in between theindices of the predecessor stack frame information item and a succeedingstack frame information item, such that the predecessor stack frameinformation item is at the end of the first new stack segmentinformation item. A technique for splitting a stack segment to add abranch point before or after a specified stack frame is disclosed belowwith reference to FIGS. 5A-C. In this scenario, that stack segmentsplitting technique can be invoked to perform the split after (ratherthan before) the specified stack segment information item, which in thisscenario is the predecessor stack segment information item.

In block 3100, the predecessor stack information item is set to be thefirst new stack segment information item produced by the splitting ofblock 3098. In block 3102, a new stack segment information item iscreated and assigned to the value of the current stack segmentinformation item. In block 3104, the value of the coalescing segmentattribute (referred to in block 3048) of the current stack frameinformation item is set to be the current stack segment informationitem. In block 3106, the current stack frame information item is addedto the element list attribute of the current stack segment informationitem. In block 3108, the predecessor stack segment information item isadded to the predecessors list attribute of the current stack segmentinformation item. In block 3110, the current stack segment informationitem is added to the successors list attribute of the predecessor stacksegment information item. In block 3112, a new seasonal trendinformation item is generated. In block 3114, a value of a trendattribute of the current stack segment information item is set to be thenew seasonal trend information item. In block 3116, the value of thelast existing entry in the fine grained segments list (referred to inblock 3034) is replaced with the value of the predecessor stack segmentinformation item. In block 3118, the current stack segment informationitem is added to the fine grained segments list. Control passes to block3162 on FIG. 3J.

Referring now to FIG. 3G, in block 3120, the current stack segmentinformation item is set to be the value of the coalescing segmentattribute of the current stack frame information item. In block 3122, adetermination is made whether the current stack segment information itemis equal to the predecessor stack segment information item. If so, thencontrol passes to block 3124. Otherwise, control passes to block 3142 onFIG. 3I.

In block 3124, a determination is made whether the predecessors listattribute of the current stack frame information item has more than oneentry. If so, then control passes to block 3128. Otherwise, controlpasses to block 3126.

In block 3126, a determination is made whether the successors listattribute of the predecessor stack frame information item has more thanone entry. If so, then control passes to block 3128. Otherwise, controlpasses to block 3162 on FIG. 3J.

In block 3128, a determination is made whether the first entry in theelements list attribute of the current stack segment information item isthe same as the current stack frame information item. If so, thencontrol passes to block 3130. Otherwise, control passes to block 3132 ofFIG. 3H.

In block 3130, a recursive segment representing the predecessor stacksegment information item and the current stack segment information itemin the fine grained segments list is updated. In an embodiment, thisupdating can involve incrementing a value of a number of recurrencesattribute of a last segment in the fine grained segments list if thelast segment is a recursive segment, or adding a new recursive segmentto the end of the fine grained segments list if the last segment is astack segment. Further information about these variables will be seenbelow in the discussion of FIGS. 6A-E. Control passes to block 3162 onFIG. 3J.

Referring now to FIG. 3H, in block 3132, a trace segment of the currentstack segment information item is split into separate first and secondnew stack segment information items that occur in between the indices ofthe predecessor stack frame information item and the current stack frameinformation item, such that the predecessor stack frame information itemis at the end of the first new stack segment information item, and suchthat the current stack frame information item is at the beginning of thesecond new stack segment information item. A technique for splitting astack segment at a branch point before or after a specified stack frameis disclosed below with reference to FIGS. 5A-C. In this scenario, thatstack segment splitting technique can be invoked to perform the splitbefore (rather than after) the specified stack segment information iteminformation item, which in this scenario is the current stack segmentinformation item.

In block 3134, the predecessor stack segment information item is set tobe the first new stack segment information item produced by thesplitting of block 3132. In block 3136, the current stack segmentinformation item is set to be the second new stack segment informationitem produced by the splitting of block 3132. In block 3138, the valueof the last existing entry in the fine grained segments list (referredto in block 3034) is replaced with the value of the predecessor stacksegment information item. In block 3140, the current stack segmentinformation item is added to the fine grained segments list. Controlpasses to block 3162 on FIG. 3J.

Referring now to FIG. 3I, in block 3142, a determination is made whetherthe last entry of the elements list attribute of the predecessor stacksegment information item is the same as the predecessor stack frameinformation item. If so, then control passes to block 3150. Otherwise,control passes to block 3144.

In block 3144, a trace segment of the predecessor stack segmentinformation item is split into separate first and second new stacksegment information items that occur in between the indices of thepredecessor stack frame information item and a succeeding stack frameinformation item, such that the predecessor stack frame information itemis at the end of the first new stack segment information item. Atechnique for splitting a stack segment at a branch point before orafter a specified stack frame is disclosed below with reference to FIGS.5A-C. In this scenario, that stack segment splitting technique can beinvoked to perform the split after (rather than before) the specifiedstack segment information item, which in this scenario is thepredecessor stack segment information item.

In block 3146, the predecessor stack segment information item is set tobe the first new stack segment information item produced by thesplitting of block 3144. In block 3148, the value of the last existingentry in the fine grained segments list (referred to in block 3034) isreplaced with the value of the predecessor stack segment informationitem. Control passes to block 3150.

In block 3150, a determination is made whether the last entry of theelements list attribute of the current stack segment information item isthe same as the current stack frame information item. If so, thencontrol passes to block 3156. Otherwise, control passes to block 3152.

In block 3152, a trace segment of the current stack segment informationitem is split into separate first and second new stack segmentinformation items that occur in between the indices of a preceding stackframe information item and the current stack frame information item,such that the current stack frame information item is at the beginningof the second new stack segment information item. A technique forsplitting a stack segment at a branch point before or after a specifiedstack frame is disclosed below with reference to FIGS. 5A-C. In thisscenario, that stack segment splitting technique can be invoked toperform the split before (rather than after) the specified stack segmentinformation item, which in this scenario is the current stack segmentinformation item.

In block 3154, the current stack segment information item is set to bethe second new stack segment information item produced by the splittingof block 3152. Control passes to block 3156.

In block 3156, the current stack segment information item is added tothe fine grained segments list (referred to in block 3034). In block3158, the predecessor stack segment information item is added to thepredecessors list attribute of the current stack segment informationitem. In block 3160, the current stack segment information item is addedto the successors list element of the predecessor stack segmentinformation item. Control passes to block 3162 on FIG. 3J.

Referring now to FIG. 3J, in block 3162, a determination is made whetherthe current stack trace element is at the top of the current stacktrace. This determination may be made by determining whether the stacktrace element index is equal to one less than the current stack tracesize. If the stack trace element index is equal to one less than thecurrent stack trace size, then the current stack trace element is at thebeginning of the current stack trace. If the current stack trace elementis at the beginning of the current stack trace, then control passes toblock 3164. Otherwise, control passes to block 3166.

In block 3164, the current stack segment information item is marked asbeing a top segment in the current stack trace. This may be accomplishedby adding a constant stack segment information item such as“SEGMENT_CEILING” to the successors list attribute of the current stacksegment information item. The current stack segment information item canbe added to the predecessors list attribute of “SEGMENT_CEILING.”Control passes to block 3166.

In block 3166, a determination is made whether any stack trace elementexists above the current stack trace element in the current stack trace.If so, then control passes to block 3168. Otherwise, control passes toblock 3170.

In block 3168, the current stack trace element is set to be a stacktrace element that exists immediately above the current stack traceelement in the current stack trace. Control passes back to block 3042 onFIG. 3B.

In block 3170, the fine-grained segments of the current threadinformation item are coalesced. A technique for coalescing fine-grainedsegments given a specified fine grained segments list is disclosed belowwith reference to FIGS. 6A-E. The technique disclosed with reference toFIGS. 6A-E produces a set of coalesced segments. In block 3172, the setof coalesced segments so produced for the current thread informationitem are stored.

In block 3174, a thread classification information item (referred to inblock 3002) is registered for the current stack trace and the set ofcoalesced segments (stored in block 3172). A technique for registering athread classification item for a specified stack trace and a specifiedset of coalesced segments is disclosed below with reference to FIGS.7A-B. The technique disclosed with reference to FIGS. 7A-B produces athread classification information item. In block 3176, the threadclassification information item so produced for the current stack traceand the set of coalesced segments (stored in block 3172) is stored.

In block 3178, thread classification statistics for the threadclassification information item (stored in block 3176) are updated. Atechnique for updating thread classification statistics for a specifiedthread classification information item is disclosed below with referenceto FIG. 8.

In block 3180, the thread classification information item is added tothe set of thread classification information items (referred to in block3002). Control passes back to block 3004 on FIG. 3A.

Referring again to FIG. 3A, in block 3182, with the set of threadclassification items having been produced, the technique illustrated inFIGS. 3A-J concludes.

Applying a Seasonal Trend Filter

FIG. 4 is a flow diagram that illustrates an example of a technique forapplying a seasonal trend filter, according to an embodiment of theinvention. In block 402, a determination is made whether an unprocessedstack segment information item in the stack segment information mapremains to be processed. If so, then control passes to block 404.Otherwise, the technique illustrated in FIG. 4 concludes.

In block 404, the current stack segment information item is set to bethe next unprocessed stack segment information item in the stack segmentinformation map. In block 406, the Holt-Winter triple exponential filteris applied to the seasonal trend information item that is the value ofthe current stack segment information item's trend attribute. In block408, an N-step (where N is 1, 2, . . . ) forecast is computed. In block410, a normalized residual of the forecast is computed. In block 412, adetermination is made whether the normal residual exceeds a specifiedcutoff. If so, then control passes to block 414. Otherwise, controlpasses to block 422.

In block 414, a determination is made whether measured thread or stacksegment intensity is above the forecast by a margin greater than aspecified margin. If so, then control passes to block 416. Otherwise,control passes to block 418.

In block 416, a warning about a hypertension state is issued. Controlpasses to block 422.

In block 418, a determination is made whether measured thread or stacksegment intensity is below the forecast by a margin greater than aspecified margin. If so, then control passes to block 420. Otherwise,control passes to block 422.

In block 420, a warning about a hypotension state is issued. Controlpasses to block 422.

In block 422, de-seasonalized trends are computed. In block 424, trendsare adjusted for a seasonal index. In block 426, a confidence level ofpredicted time horizons is computed. In block 428, a determination ismade whether the confidence level of a predicted time horizon exceeds aspecified threshold. If so, then control passes to block 430. Otherwise,control passes back to block 402.

In block 430, a warning about saturation or an endpoint state in thehorizon is issued. Control passes back to block 402.

Splitting a Stack Segment at a Branch Point Before or after a StackFrame

FIGS. 5A-C show a flow diagram that illustrates an example of atechnique for splitting a stack segment at a branch point before orafter a stack frame, according to an embodiment of the invention. Thetechnique can be performed relative to a specified stack segmentinformation item and a corresponding specified stack frame informationitem. The technique can be invoked with directions to perform the spliteither before or after the stack frame represented by the specifiedstack frame information item. The technique can produce a pair (firstand second) of new stack segment information items resulting from thesplit. Referring first to FIG. 5A, in block 502, the current elementlist is set to be the value of the element list attribute of thespecified stack segment information item. In block 504, a stack frameinformation index is set to be the index of the specified stack frameinformation item within the current element list. In block 506, adetermination is made whether the split is directed to be performedbefore the specified stack frame. If so, then control passes to block508. Otherwise, control passes to block 512.

In block 508, a first segment is set to be a sub-list of the currentelement list spanning from the beginning of the current element list tothe element having an index that is one less than the stack frameinformation index. In block 510, a second segment is set to be asub-list of the current element list spanning from the element havingthe stack frame information index to the end of the current elementlist. Control passes to block 516.

In block 512, a first segment is set to be a sub-list of the currentelement list spanning from the beginning of the current element list tothe element having the stack frame information index. In block 514, asecond segment is set to be a sub-list of the current element listspanning from the element having an index that is one more than thestack frame information index to the end of the current element list.Control passes to block 516.

In block 516, a new predecessor stack segment information item iscreated. In block 518, an element list attribute of the new predecessorstack segment information item is set to be the first segment. In block520, for each predecessor stack frame information item in the firstsegment, the coalescing segment attribute of the predecessor stack frameinformation item is set to be the new predecessor stack segmentinformation item. An exception can be raised if the value of thatcoalescing segment attribute was not previously equal to the specifiedstack segment information item that is being split. Control passes toblock 522 on FIG. 5B.

Referring now to FIG. 5B, in block 522, a new successor stack segmentinformation item is created. In block 524, an element list attribute ofthe new successor stack segment information item is set to be the secondsegment. In block 526, for each successor stack frame information itemin the second segment, the coalescing segment attribute of the successorstack frame information item is set to be the new successor stacksegment information item. An exception can be raised if the value ofthat coalescing segment attribute was not previously equal to thespecified stack segment information item that is being split.

In block 528, all of the elements in the predecessors list attribute ofthe specified stack segment information item being split are added tothe predecessors list attribute of the predecessor stack segmentinformation item. In block 530, the successor stack segment informationitem is added to the successors list attribute of the predecessor stacksegment information item. In block 532, the predecessor stackinformation item is added to the predecessors list attribute of thesuccessor stack segment information item. In block 534, all of theelements in the successors list attribute of the specified stack segmentinformation item being split are added to the successors list attributeof the successor stack segment information item.

In block 536, the seasonal trend information item is set to be a cloneof the seasonal trend information attribute of the specified stacksegment information item being split. In block 538, a trend attribute ofthe predecessor stack segment information item is set to be a clone ofthe seasonal trend information item. In block 540, a trend attribute ofthe successor stack segment information item is set to be the seasonaltrend information item. Control passes to block 542 on FIG. 5C.

Referring now to FIG. 5C, in block 542, a number of occurrencesattribute of the predecessor stack segment information item is set to bethe value of the number of occurrences attribute of the specified stacksegment information item being split. A total number of occurrencesattribute of the predecessor stack segment information item also can beset to be the value of a total number of occurrences attribute of thespecified stack segment information item being split. In block 544, anumber of occurrences attribute of the successor stack segmentinformation item is set to be the value of the number of occurrencesattribute of the specified stack segment information item being split. Atotal number of occurrences attribute of the successor stack segmentinformation item also can be set to be the value of a total number ofoccurrences attribute of the specified stack segment information itembeing split.

In block 546, a first segment attribute of the specified stack segmentinformation item is set to be the predecessor stack segment informationitem. In block 548, a second segment attribute of the specified stacksegment information item is set to be the successor stack segmentinformation item. In block 550, a coalescing segment attribute of thepredecessor stack information item is set to be the specified stacksegment information item. In block 552, a coalescing segment attributeof the successor stack information item is set to be the specified stacksegment information item. In block 554, with the predecessor stacksegment information item and the successor stack information item havingbeen produced as the new first and second stack segment informationitems resulting from the split, the technique concludes.

Coalescing the Stack Segments of a Thread

FIGS. 6A-E show a flow diagram that illustrates an example of atechnique for coalescing the stack segments of a thread, according to anembodiment of the invention. The technique can be performed relative toa specified fine grained segments list. The technique can produce a setof coalesced segments. Referring first to FIG. 6A, in block 602, anempty coalesced segments list of segment information items is created.In block 604, a value of a current index is set to be one less than thesize of the specified fine grained segments list. In block 606, a lastsegment is set to be the segment having the current index in thespecified fine grained segments list. In block 608, the value of thecurrent index is decremented. In block 610, a determination is madewhether the current index is less than zero. If so, then control passesto block 692. Otherwise, control passes to block 612.

In block 612, a predecessor segment is set to be the segment having thecurrent index in the specified fine grained segments list. In block 614,a flag, indicating whether the last segment is coalesced with thepredecessor segment, is set to be true. In block 616, a determination ismade whether both the last segment and the predecessor segment arerecursive segments. If so, then compare whether the classificationattribute of the predecessor recursive segment is same as theclassification attribute of the last recursive segment. Theclassification attribute of a recursive segment is referred to in blocks634 and 670. In an embodiment, this determination is accomplished bydetermining whether both the last segment and the predecessor segmentare instances of a recursive segment information class. If both segmentsare recursive segments, then compare the classification attributes ofthe predecessor recursive segment with the classification attribute ofthe last recursive segment. If both attribute values are the same, thencontrol passes to block 618. Otherwise, control passes to block 620 onFIG. 6B.

In block 618, the value of a number of recurrences attribute of the lastsegment is increased by a value of a number of recurrences attribute ofthe predecessor segment. Control passes to block 646 on FIG. 6C.

Referring now to FIG. 6B, in block 620, a determination is made whetherthe last segment is a recursive segment and the predecessor segment is astack segment. If so then compare the classification attribute of thelast recursive segment with the value of the predecessor segment. Theclassification attribute of a recursive segment is referred to in blocks634 on FIGS. 6B and 670 on FIG. 6D. If the value of the classificationattribute of the last segment is same as the value of the predecessorsegment, control passes to block 622. Otherwise, control passes to block624.

In block 622, the value of a number of recurrences attribute of the lastsegment is incremented. Control passes to block 646 on FIG. 6C.

In block 624, a determination is made whether the predecessor segment isa recursive segment and the last segment is a stack segment. If so thencompare the classification attribute of the predecessor recursivesegment with the value of the last segment. The classification attributeof a recursive segment is referred to in blocks 634 on FIGS. 6B and 670on FIG. 6D. If the value of the classification attribute of thepredecessor segment is same as the value of the last segment, controlpasses to block 626. Otherwise, control passes to block 630.

In block 626, the last segment is set to be the predecessor segment. Inblock 628, the value of a number of recurrences attribute of the lastsegment is incremented. Control passes to block 646 on FIG. 6C.

In block 630, a determination is made whether the predecessor segment isequal to the last segment. If so, then control passes to block 632.Otherwise, control passes to block 640 on FIG. 6C.

In block 632, a new recursive segment information item is created. Inblock 634, a classification attribute of the new recursive segmentinformation item is set to be the last segment. In certain embodiments,this classification attribute can be checked as part of a determinationof whether two adjacent recursive segments represent the recursions ofthe same segment indicated by the classification attribute, andconsequently, the adjacent recursive segments can be coalesced into onerecursive segment, as referred to in blocks 616 on FIG. 6A, and 620 and624 on FIG. 6B. In block 636, the value of a number of recurrencesattribute of the new recursive segment information item is set to two.In block 638, the last segment is set to be the new recursive segmentinformation item. Control passes to block 646 on FIG. 6C.

Referring now to FIG. 6C, in block 640, a determination is made whetherthe last segment and the predecessor segment can be coalesced. In anembodiment, the last segment and the predecessor segment can becoalesced if all of the following are true: (1) the values of thecoalescing segment attributes of each are the same, (2) the values ofthe coalescing segment attribute of each is non-null, (3) a value of afirst segment attribute of the coalescing segment attribute of thepredecessor segment is the predecessor segment, and (4) a value of asecond segment attribute of the coalescing segment attribute of the lastsegment is the last segment. In a certain embodiment two adjacentsegments can be coalesced if they are split from the same coalescingsegment by the blocks 546, 548, 550, and 552 on FIG. 5C. In other words,the above conditions (1) and (2) tests the effect of blocks 552 and 554,the condition (3) tests the effect of block 546, and the condition (4)tests the effect of block 548. If the last segment and the predecessorsegment can be coalesced, then control passes to block 642. Otherwise,control passes to block 644.

In block 642, the last segment is set to be the value of the coalescingsegment attribute of the last segment. Control passes to block 646.

In block 644, the flag (referred to in block 614) that indicates whetherthe last segment is coalesced with the predecessor segment is set to befalse. Control passes to block 646.

In block 646, a determination is made whether the flag (referred to inblock 614) that indicates whether the last segment is coalesced with thepredecessor segment is true. If so, then control passes to block 648.Otherwise, control passes to block 688 on FIG. 6E.

In block 648, a successor segment is set to be a successor of a lastsegment in the coalesced segments list (referred to in block 602). Inblock 650, a flag, indicating whether the last segment is coalesced withthe successor segment, is set to be true. In block 652, a determinationis made whether the last segment and the successor segment are bothrecursive segments. If so, then compare whether the classificationattribute of the successor recursive segment is same as theclassification attribute of the last recursive segment. Theclassification attribute of a recursive segment is referred to in blocks634 and 670. If so, then control passes to block 654. Otherwise, controlpasses to block 656 on FIG. 6D.

In block 654, the value of a number of recurrences attribute of the lastsegment is increased by a value of a number of recurrences attribute ofthe successor segment. Control passes to block 682 on FIG. 6E.

Referring now to FIG. 6D, in block 656, a determination is made whetherthe last segment is a recursive segment and the successor segment is astack segment. If so then compare the classification attribute of thelast recursive segment with the value of the successor segment. Theclassification attribute of a recursive segment is referred to in blocks634 on FIGS. 6B and 670 on FIG. 6D. If the value of the classificationattribute of the last segment is same as the value of the successorsegment, control passes to block 658. Otherwise, control passes to block660.

In block 658, the value of a number of recurrences attribute of the lastsegment is incremented. Control passes to block 682 on FIG. 6E.

In block 660, a determination is made whether the successor segment is arecursive segment and the last segment is a stack segment. If so thencompare the classification attribute of the successor recursive segmentwith the value of the last segment. The classification attribute of arecursive segment is referred to in blocks 634 on FIGS. 6B and 670 onFIG. 6D. If the value of the classification attribute of the successorsegment is same as the value of the last segment, control passes toblock 662. Otherwise, control passes to block 666.

In block 662, the last segment is set to be the successor segment. Inblock 664, the value of a number of recurrences attribute of the lastsegment is incremented. Control passes to block 682 on FIG. 6E.

In block 666, a determination is made whether the successor segment isequal to the last segment. If so, then control passes to block 668.Otherwise, control passes to block 676 on FIG. 6E.

In block 668, a new recursive segment information item is created. Inblock 670, a classification attribute of the new recursive segmentinformation item is set to be the last segment. In certain embodiments,this classification attribute can be checked as part of a determinationof whether two adjacent recursive segments represent the recursions ofthe same segment indicated by the classification attribute, andconsequently, the adjacent recursive segments can be coalesced into onerecursive segment, as referred to in blocks 616 on FIG. 6A, and 620 and624 on FIG. 6B. In block 672, the value of a number of recurrencesattribute of the new recursive segment information item is set to two.In block 674, the last segment is set to be the new recursive segmentinformation item. Control passes to block 682 on FIG. 6E.

Referring now to FIG. 6E, in block 676, a determination is made whetherthe last segment and the successor segment can be coalesced. In anembodiment, the last segment and the successor segment can be coalescedif all of the following are true: (1) the values of the coalescingsegment attributes of each are the same, (2) the values of thecoalescing segment attribute of each is non-null, (3) a value of a firstsegment attribute of the coalescing segment attribute of the lastsegment is the last segment, and (4) a value of a second segmentattribute of the coalescing segment attribute of the successor segmentis the successor segment. In a certain embodiment two adjacent segmentscan be coalesced if they are split from the same coalescing segment bythe blocks 546, 548, 550, and 552 on FIG. 5C. In other words, the aboveconditions (1) and (2) tests the effect of blocks 552 and 554, thecondition (3) tests the effect of block 546, and the condition (4) teststhe effect of block 548. If the last segment and the successor segmentcan be coalesced, then control passes to block 678. Otherwise, controlpasses to block 680.

In block 678, the last segment is set to be the value of the coalescingsegment attribute of the last segment. Control passes to block 682 onFIG. 6E.

In block 680, the flag (referred to in block 650) that indicates whetherthe last segment is coalesced with the successor segment is set to befalse. Control passes to block 682.

In block 682, a determination is made whether the flag (referred to inblock 650) that indicates whether the last segment is coalesced with thesuccessor segment is true. If so, then control passes to block 684.Otherwise, control passes to block 690.

In block 684, the successor segment is removed from the coalescedsegments list (referred to in block 602). In block 686, the successorsegment is set to be the successor of the last segment in the coalescedsegments list. Control passes to block 690.

In block 688, the last segment is added to the beginning of thecoalesced segments list (referred to in block 602). Control passes toblock 690.

In block 690, the value of the current index is decremented. Controlpasses back to block 610 on FIG. 6A.

Referring again to FIG. 6A, in block 692, the last segment is added tothe bottom of the coalesced segments list (referred to in block 602). Inblock 694, with the set of coalesced segments having been produced inthe form of the coalesced segments list, the technique concludes.

Registering a Thread Classification Signature for a Stack Trace andCoalesced Segments of a Thread

FIGS. 7A-B show a flow diagram that illustrates an example of atechnique for registering a thread classification item for a specifiedstack trace and a specified set of coalesced segments, according to anembodiment of the invention. The technique can be performed relative toa specified stack trace and a specified set of coalesced segments. Thetechnique can produce a thread classification information item.Referring first to FIG. 7A, in block 702, a number of stack frames isset to be the size of the specified stack trace. In block 704, a numberof coalesced segments is set to be the size of the specified set ofcoalesced segments. In block 706, a flag, which indicates whether athread classification information item has been registered to representthe thread corresponding to the specified stack trace, is set to befalse. In block 708, a determination is made whether any unprocessedregistered thread classification information item remains in the threadclassification information map. If so, then control passes to block 710.Otherwise, control passes to block 720 on FIG. 7B.

In block 710, the current registered thread classification informationitem is set to be the next unprocessed registered thread classificationinformation item in the thread classification information map. In block712, a determination is made whether both (1) the number of stack framesis equal to the number of stack frames attribute of the currentregistered thread classification information item and (2) the number ofcoalesced segments is equal to the number of coalesced segmentsattribute of the current registered thread classification informationitem. If so, then control passes to block 714. Otherwise, control passesto block 720 on FIG. 7B.

In block 714, a determination is made whether, for each index value, thesegment of the coalesced segments having that index value is equal tothe segment attribute having that index value in the current registeredthread classification information item. If so, then control passes toblock 716. Otherwise, control passes back to block 708.

In block 716, the thread classification information item is set to bethe current registered thread classification information item. In block718, the flag (referred to in block 706) that indicates whether a threadclassification information item has been registered to represent thethread corresponding to the specified stack trace is set to be true.Control passes to block 720.

Referring now to FIG. 7B, in block 720, a determination is made whetherthe flag (referred to in block 706) that indicates whether a threadclassification information item has been registered to represent thethread corresponding to the specified stack trace is true. If so, thencontrol passes to block 734. Otherwise, control passes to block 722.

In block 722, a new thread classification information item is created.In block 724, a segments attribute of the new thread classificationinformation item is set to be the specified set of coalesced segments.In block 726, a trend attribute of the new thread classificationinformation item is set to be a new seasonal trend information item. Inblock 728, a number of stack frames attribute of the new threadclassification information item is set to be the number of stack frames.In block 730, a number of coalesced segments attribute of the new threadclassification information item is set to be the number of coalescedsegments. In block 732, the new thread classification information itemis added to the thread classification information map. This additionregisters the new thread classification information item to representthe signature for an equivalence class of threads represented by thethread corresponding to the specified stack trace. Control passes toblock 734.

In block 734, with the thread classification information item havingbeen produced, the technique concludes.

Updating Stack Classification Statistics

FIG. 8 is a flow diagram that illustrates an example of a technique forupdating thread classification statistics for a specified threadclassification information item, according to an embodiment of theinvention. The technique can be performed relative to a specified threadclassification information item. In block 802, the value of a number ofoccurrences attribute of the specified thread classification informationitem is incremented. A value of a total number of occurrences attributeof the specified thread classification information item also can beincremented. In block 804, a determination is made whether anyunprocessed segment information items remain in the specified threadclassification information item. If so, then control passes to block806. Otherwise, the technique concludes.

In block 806, the current segment information item is set to be the nextunprocessed segment information item in the specified threadclassification information item. In block 808, the stack segmentstatistics for the current segment information item are updated. Atechnique for updating stack segment statistics for a specified segmentinformation item is disclosed below with reference to FIG. 9. Controlpasses back to block 804.

Updating Stack Segment Statistics

FIG. 9 is a flow diagram that illustrates an example of a technique forupdating stack segment statistics for a specified segment informationitem, according to an embodiment of the invention. The technique can beperformed relative to a specified segment information item. In block902, the value of a number of occurrences attribute of the specifiedsegment information item is incremented. A value of a total number ofoccurrences attribute of the specified segment information item also canbe incremented. In block 904, a determination is made whether anyunprocessed segment information items remains in the specified segmentinformation item. If so, then control passes to block 906. Otherwise,the technique concludes.

In block 906, the current segment information item is set to be the nextunprocessed segment information item in the specified segmentinformation item. In block 908, the stack segment statistics for thecurrent segment information item are updated using this technique ofFIG. 9. Control passes back to block 904.

Seasonal Trending and Forecasting Based on Java Heap Size, ThreadIntensity, and Stack Segment Intensity Measurements

A cloud control system for JAVA platform services can monitor the timeseries data for JAVA heap allocation to estimate trends and to forecastmemory capacity requirements. By detecting seasonal trends andforecasting the memory capacity requirements, the system can dynamicallyreallocate shared system memory among JVMs to enable elasticity inresource allocation. Forecasting of capacity requirements involvesestimation of the JAVA heap growth rate. Java heap allocation ismeasured by full garbage collection cycles that run at irregular timeintervals. Estimation of JAVA heap growth rate involves division byrandom time intervals which is complicated by the irregular timeintervals that intermittently get arbitrarily close to zero. The noisein growth rate measurement is a ratio of two Gaussian distributionsyielding Cauchy distribution, which can be hard to filter. The mean andstandard deviation of the Cauchy distribution are undefined in the sensethat a large number of data points do not yield more accurate estimateof the mean and standard deviation than does a single data point.Increasing the pool of samples can increase the likelihood ofencountering sample points with a large absolute value corresponding todivision by a time close interval. Unlike JAVA heap size measurementswhose sampling intervals are irregular due to the irregularity of fullgarbage collection cycles, the thread or stack segment intensitymeasurements can be sampled at regular intervals to avoid time-closeintervals. Even so, the same techniques described herein for trending ofJAVA heap allocation can be applied to seasonal trending and forecastingof thread and stack segment intensity measurements. The technique canadjust for the variable latencies due to the CPU scheduling of thethreads and the interference of the Full GC cycles, which addsadditional variability to the latencies of the sampling threads. Thetechnique can also adjust for the variable sampling intervals due to thevariable computation time required to classify the stack segments.

A Holt-Winter triple exponential filter, published in 1957 and 1960, canbe used for seasonal trending and forecasting. C. C. Holt, “ForecastingTrends and Seasonal by Exponentially Weighted Averages,” Office of NavalResearch Memorandum, no. 52 (1957) is incorporated by reference herein.P. R. Winters, “Forecasting Sales by Exponentially Weighted MovingAverages,” Management Science, vol. 6, no. 3, p. 324-342 (1960) isincorporated by reference herein. Wright extended the Holt-Winterformulae in 1986 to support irregular time intervals. D. J. Wright,“Forecasting data published at irregular time intervals using anextension of Holt's method,” Management Science, vol. 32, no. 4, pp.499-510 (1986) is incorporated by reference herein. In 2008, Hanzakproposed an adjustment factor for time-close intervals. T. Hanzak,“Improved Holt Method for Irregular Time Series,” WDS'08 ProceedingsPart I, pp. 62-67 (2008) is incorporated by reference herein.

The adjustment factor for time close intervals, which is meant tocompensate for higher relative intensity of noise due to a randomtime-close interval in the rate estimate, can inadvertently dampen therate of change estimates if the time interval decreases monotonicallyduring a congestion caused by memory leaks or deadlocks. Polynomial timecomplexity on the total size of heap of full garbage collectionalgorithm can result in decreasing JVM runtime intervals as congestionworsens. In case of JAVA memory leaks, as the time interval decreases,the run time can decrease but the measurement time can increase becausethe JVM can be frozen longer for full garbage collection. If the JVM isfrozen during full garbage collection, new requests can be queued upoutside the JVM, with some portion redistributed to other JVMs. Thebacklog can accelerate the rate of change of the heap usage during thesubsequent run time. In an embodiment, Hanzak's adjustment fortime-close intervals is used for trending and forecasting of JAVA heapallocation and to track the accelerating heap growth rate.

In an embodiment, exponential moving averages can be applied to smoothout the time-series data from full garbage collection cycles, toestimate the growth rate, acceleration of growth rate, seasonal trend,error residual of forecast, and absolute deviation of forecast, toenable outlier detection and forecasting of JAVA memory heap allocation.An embodiment of the invention can track the acceleration of growth ratedue to congestions. Disclosed herein are new adjustment factors thatgive more weights to more recent sample points when the measurement timeis increasing. These adjustment factors can reduce to Hanzak'sadjustment factor if the measurement time is a negligible constant andthe time interval is comprised mostly by the run time. Embodiments ofthe invention can include adaptive scaling of the time for numericalstability, i.e. to avoid underflow of the double precision floatingpoint representation. Time intervals can be adaptively scaledproportionally so that the average time interval is scaled close to 1.Estimations can be tracked in parallel by three or more independentfilters running at different time scales. Depending on the time scale,these parallel filters can serve as multiple policies for predictingseasonal trends, long-term capacity demands, short term end-points(out-of-memory errors), etc. Embodiments of the invention utilizeimproved formulae for seasonal indexing to select, from among adjacentindices, the seasonal index that minimizes the normalized errorresidual. Embodiments of the invention can apply a supervisory controlloop to fit the model by non-linear regression for each JVM instance(capturing the operating characteristics of the tenants, applications,users, etc.) for estimating various filter parameters and seasonalfactors. Embodiments of the invention can push the filter parameters andseasonal factors from a supervisory controller to update the filtersembedded in each JVM (using MBean with Hotspot or JRockitinstrumentations).

In an embodiment of the invention, a fourth and a fifth exponentialfilters, in addition to the Holt-Winter triple exponential filters, areused to trend the mean and deviation of forecast error residual tocompute the normalized error residual. The mean of forecast errorresidual can be interpreted as the bias of an identified model in afilter. Such a bias can indicate presence of a level spike, a temporarylevel shift, a permanent level shift, or a level drift. The deviation offorecast error residual can indicate variance change in the time seriesdata. In an embodiment, the magnitude of variance change can effect thetolerance of a filter for detecting outliers. A measurement is detectedas an outlier if its forecast error residual is larger than a percentageof the moving average of forecast error residual deviations.Conceptually, an outlier is a measurement which is not explained by thetrend model identified in the filter, hence a cluster of outliers canindicate an anomaly that can only be explained by some extraneouscauses. Embodiments of the invention adapts the tolerance of a filterfor outlier detection depending on the variance change in themeasurements. This technique reduces alert fatigue by reducing thenumber of outlier alerts when high variance change persists in thesystem.

In an embodiment of the invention, Holt-Winter triple exponential filtercan be applied for seasonal trending and forecasting of JVM heap usageto efficiently achieve elasticity in JVM memory allocation. The standardHolt-Winter triple exponential filter, which can be applied to demandforecasting from regular time series, can be specially adjusted to workfor the random time intervals with irregular time-close intervals.Embodiments of the invention can apply the Wright formula for irregulartime intervals and Hanzak's adjustment for time-close intervals fortrending and forecasting of JAVA heap allocation. A non-trivialselection of a structure of the filters suitable for the random timeintervals seen in JVM full garbage collection can be performed. Thestructure of the Holt-Winter-Wright-Hanzak filters can be derived fromfirst principles to systematically devise the adaptations to match thetime series generated by JVM full garbage collection cycles. Anon-trivial selection of extensions of the filters useful to predict JVMmemory usage trends can be performed. The selected extensions caninclude, for example, an extension to filter the acceleration of growthrate (in order to track the congestions), an extension to run indifferent time scales in parallel (since irregular time intervals havesome correlation to the seasons), and an extension to select theseasonal index (analogous to fuzzy logic) by minimizing the normalizederror residual (which can be used to react to discontinuity caused bysoft references). Embodiments of the invention can complement andaugment an embedded system with a non-trivial supervisory controller andframework that applies non-linear regression for parameter estimation totune embedded filters.

Techniques described herein for seasonal trending, forecasting, anomalydetection, and endpoint prediction can be added to an existingsupervisory control framework, such as the CARE control frameworkdiscussed above. The model identification by a supervisory controllercan provide a baseline for detecting outliers. A cluster of outliers canindicate anomalies in the system. Some of these anomalies can representleading indicators for system faults and outages. When criticalanomalies are detected or process endpoints are predicted, the systemcan generate automatic diagnostic repository (ADR) incident reports withthread dumps and heap dumps to aid in debugging the applications,configurations, and system glitches. The system can also report criticalalerts to an enterprise manager (EM) cloud control.

In an embodiment, formulae for exponential moving averages are appliedto smooth out time-series data, locally linear trend, seasonal trend,error residual of forecast, and absolute deviation of forecast formonitoring and forecasting of resource utilization measures such asmemory heap usage and thread or stack segment intensity. In anembodiment, the formulae can be based on Brown's exponential filterproposed in 1956, Holt's double exponential filter proposed in 1957,Winters' triple exponential filter proposed in 1960, Wright's extensionfor irregular time intervals proposed in 1986, Hanzak's adjustmentfactor for time-close intervals proposed in 2008, and outlier detectionand clipping. The following publications are included by referenceherein: R. G. Brown, “Exponential Smoothing for Predicting Demand,”Cambridge, Arthur D. Little Inc. (1956), p. 15; C. C. Holt, “ForecastingTrends and Seasonal by Exponentially Weighted Averages,” Office of NavalResearch Memorandum, no. 52, (1957); P. R. Winters, “Forecasting Salesby Exponentially Weighted Moving Averages,” Management Science, vol. 6,no. 3, p. 324-342, (1960); D. J. Wright, “Forecasting data published atirregular time intervals using an extension of Holt's method,”Management Science, vol. 32, no. 4, pp. 499-510 (1986); T. Hanzak,“Improved Holt Method for Irregular Time Series,” WDS'08 ProceedingsPart I, pp. 62-67 (2008); and S. Maung, S. W. Butler and S. A. Henck,“Method and Apparatus for process Endpoint Prediction based on ActualThickness Measurements,” U.S. Pat. No. 5,503,707 (1996).

Exponential Weighted Moving Average

Time series data can be smoothed by normalized weighted sum of the datapoints where the weights are selected appropriately depending on theautocorrelation of the time series (in autoregressive moving averagemodel), length of the time intervals, and other factors:

${\overset{\_}{x}}_{n} = {\frac{1}{\sum\limits_{i = 0}^{n}w_{i}}\left\lbrack {{w_{n}x_{n}} + {w_{n - 1}x_{n - 1}} + {w_{n - 2}x_{n - 2}} + \ldots + {w_{0}x_{0}}} \right\rbrack}$

Exponential moving average is a weighted sum of the data points wherethe weights

${{\frac{1}{\sum\limits_{i = 0}^{n}w_{i}}w_{k}} = {\alpha\left( {1 - \alpha} \right)}^{k}},{0 < \alpha < 1},$are in exponential form. This form assumes that the sampling interval isregular:

$\begin{matrix}{{\overset{\_}{x}}_{n} = {{\alpha\; x_{n}} + {{\alpha\left( {1 - \alpha} \right)}x_{n - 1}} + {{\alpha\left( {1 - \alpha} \right)}^{2}x_{n - 2}} + \ldots + {{\alpha\left( {1 - \alpha} \right)}^{n}x_{0}}}} \\{= {\alpha\left\lbrack \;{x_{n} + {\left( {1 - \alpha} \right)x_{n - 1}} + {\left( {1 - \alpha} \right)^{2}x_{n - 2}} + \ldots + {\left( {1 - \alpha} \right)^{n}x_{0}}} \right\rbrack}} \\{= {\alpha{\sum\limits_{i = 0}^{n}{\left( {1 - \alpha} \right)^{n - i}x_{i}}}}}\end{matrix}$

The above expression gives the normalized exponentially weighted sum ofdata series for regular time intervals. The parameter α is anormalization factor, as n→∞:

${\alpha = \frac{1}{\sum\limits_{i = 0}^{n}\left( {1 - \alpha} \right)^{n - i}}},\left. n\rightarrow\infty \right.$${\overset{\_}{x}}_{n} = {\frac{1}{\sum\limits_{i = 0}^{n}\left( {1 - \alpha} \right)^{n - i}}{\underset{i = 0}{\overset{n}{\;\sum}}{\left( {1 - \alpha} \right)^{n - i}x_{i}}}}$

This series is equivalently represented in a sequential form:x _(n) =αx _(n)+(1−α) x _(n−1)

It can be shown by expanding the sequential form recursively that it isequivalent to the normalized exponentially weighted sum:

$\begin{matrix}{{\overset{\_}{x}}_{n} = {{\alpha\; x_{n}} + {\left( {1 - \alpha} \right)\left\lbrack {{\alpha\; x_{n - 1}} + {\left( {1 - \alpha} \right){\overset{\_}{x}}_{n - 2}}} \right\rbrack}}} \\{= {{\alpha\; x_{n}} + {{\alpha\left( {1 - \alpha} \right)}x_{n - 1}} + {\left( {1 - \alpha} \right)^{2}{\overset{\_}{x}}_{n - 2}}}} \\{= {{\alpha\; x_{n}} + {{\alpha\left( {1 - \alpha} \right)}x_{n - 1}} + {\left( {1 - \alpha} \right)^{2}\left\lbrack {{\alpha\; x_{n - 2}} + {\left( {1 - \alpha} \right){\overset{\_}{x}}_{n - 3}}} \right\rbrack}}} \\{= {{\alpha\; x_{n}} + {{\alpha\left( {1 - \alpha} \right)}x_{n - 1}} + {{\alpha\left( {1 - \alpha} \right)}^{2}\; x_{n - 2}} + {\left( {1 - \alpha} \right)^{3}{\overset{\_}{x}}_{n - 3}}}} \\{= {{\alpha\; x_{n}} + {{\alpha\left( {1 - \alpha} \right)}x_{n - 1}} + {{\alpha\left( {1 - \alpha} \right)}^{2}\; x_{n - 2}} +}} \\{\left( {1 - \alpha} \right)^{3}\left\lbrack {{\alpha\; x_{n - 3}} + {\left( {1 - \alpha} \right){\overset{\_}{x}}_{n - 4}}} \right\rbrack} \\{= {{\alpha\; x_{n}} + {{\alpha\left( {1 - \alpha} \right)}x_{n - 1}} + {{\alpha\left( {1 - \alpha} \right)}^{2}\; x_{n - 2}} + \ldots + {{\alpha\left( {1 - \alpha} \right)}^{n}x_{0}}}}\end{matrix}$Wright's Extension for Irregular Time Intervals

Wright (cited above) extended the formula for normalized exponentiallyweighted sum for irregular time intervals:

${\overset{\_}{x}}_{t_{n}} = {\frac{1}{\sum\limits_{i = 0}^{n}\left( {1 - \alpha} \right)^{({t_{n} - t_{i}})}}{\underset{i = 0}{\overset{n}{\;\sum}}{\left( {1 - \alpha} \right)^{({t_{n} - t_{i}})}x_{t_{i}}}}}$

Denoting the normalization factor by u_(t) _(n) and the weighted sum byA_(t) _(n) :

$u_{t_{n}} = \frac{1}{\sum\limits_{i = 0}^{n}\left( {1 - \alpha} \right)^{({t_{n} - t_{i}})}}$$A_{t_{n}} = {\sum\limits_{i = 0}^{n}{\left( {1 - \alpha} \right)^{({t_{n} - t_{i}})}x_{t_{i}}}}$${\overset{\_}{x}}_{t_{n}} = {u_{t_{n}}A_{t_{n}}}$

If b_(k)=(1−α)^((t) ^(k) ^(−t) ^(k−1) ⁾, then the expression (1−α)^((t)^(l) ^(−t) ^(l−m) ⁾, l>m, can be represented by π_(l,l−m)=b_(l)b_(l−1) .. . b_(l−m+1).

$\begin{matrix}{\pi_{l,{l - m}} = \left( {1 - \alpha} \right)^{({t_{l} - t_{l - m}})}} \\{= \left( {1 - \alpha} \right)^{{({t_{l} - t_{l - 1}})} + {({t_{l - 1} - t_{l - 2}})} + \;\ldots\; + {({t_{l - m + 1} - t_{l - m}})}}} \\{= {\left( {1 - \alpha} \right)^{({t_{l} - t_{l - 1}})}\left( {1 - \alpha} \right)^{({t_{l - 1} - t_{l - 2}})}\mspace{14mu}\ldots\mspace{11mu}\left( {1 - \alpha} \right)^{({t_{l - m + 1} - t_{l - m}})}}} \\{= {b_{l}b_{l - 1}\mspace{14mu}\ldots\mspace{14mu} b_{l - m + 1}}}\end{matrix}$

If the time intervals are regular, b=b_(l)=b_(l−1)= . . . =b_(l−m+1),this expression reduces to

$\begin{matrix}{\pi_{l,{l - m}} = \left( {1 - \alpha} \right)^{({l - l + m})}} \\{= b^{m}}\end{matrix}$

The sequential form for the series u_(t) _(n) : can be derived:

$\begin{matrix}{\frac{1}{u_{t_{n}}} = {\sum\limits_{i = 0}^{n}\;\left( {1 - \alpha} \right)^{({t_{n} - t_{i}})}}} \\{= {\left( {1 - \alpha} \right)^{({t_{n} - t_{n}})} + \left( {1 - \alpha} \right)^{({t_{n} - t_{n - 1}})} + \left( {1 - \alpha} \right)^{({t_{n} - t_{n - 2}})} + \ldots +}} \\{\left( {1 - \alpha} \right)^{({t_{n} - t_{0}})}}\end{matrix}$

Substituting (1−α)^((t) ^(k) ^(−t) ^(k−1) ⁾=b_(k) and (1−α)^((t) ^(l)^(−t) ^(l−m) ⁾=b_(l)b_(l−1) . . . b_(l−m+1):

$\begin{matrix}{\frac{1}{u_{t_{n}}} = {1 + b_{n} + {b_{n}b_{n - 1}} + \ldots + {b_{n}b_{n - 1}\ldots\mspace{11mu} b_{1}}}} \\{= {1 + {b_{n}\left( {1 + b_{n - 1} + {b_{n - 1}b_{n - 2}} + \ldots +} \right.}}} \\{\left. {b_{n - 1}b_{n - 2}\mspace{11mu}\ldots\mspace{14mu} b_{1}} \right),}\end{matrix}$

It can be observed that

$\frac{1}{u_{t_{n - 1}}} = {\left( {1 + b_{n - 1} + {b_{n - 1}b_{n - 2}} + \;\ldots\; + {b_{n - 1}b_{n - 2}\ldots\mspace{11mu} b_{1}}} \right).}$

Hence,

$\begin{matrix}{\frac{1}{u_{t_{n}}} = {1 + \frac{b_{n}}{u_{t_{n - 1}}}}} \\{= \frac{u_{t_{n - 1}} + b_{n}}{u_{t_{n - 1}}}}\end{matrix}$

The sequential form is derived:

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + b_{n}}$

The expression for b_(n) that will be used subsequently is:

$b_{n} = \frac{u_{t_{n - 1}}\left( {1 - u_{t_{n}}} \right)}{u_{t_{n}}}$

Similarly, the sequential form for the series A_(t) _(n) is derived:

$\begin{matrix}{A_{t_{n}} = {\sum\limits_{i = 0}^{n}\;{\left( {1 - \alpha} \right)^{({t_{n} - t_{i}})}x_{t_{i}}}}} \\{= {{\left( {1 - \alpha} \right)^{({t_{n} - t_{n}})}x_{t_{n}}} + {\left( {1 - \alpha} \right)^{({t_{n} - t_{n - 1}})}x_{t_{n - 1}}} +}} \\{{\left( {1 - \alpha} \right)^{({t_{n} - t_{n - 2}})}x_{t_{n - 2}}} + \ldots + {\left( {1 - \alpha} \right)^{({t_{n} - t_{0}})}x_{t_{0}}}}\end{matrix}$

Substituting (1−α)^((t) ^(k) ^(−t) ^(k−1) ⁾=b_(k) and (1−α)^((t) ^(l)^(−t) ^(l−m) ⁾=b_(l)b_(l−1) . . . b_(l−m+1):

$\begin{matrix}{A_{t_{n}} = {x_{t_{n}} + {b_{n}x_{t_{n - 1}}} + {b_{n}b_{n - 1}x_{t_{n - 2}}} + \ldots + {b_{n}b_{n - 1}\ldots\mspace{11mu} b_{1}x_{t_{0}}}}} \\{= {x_{t_{n}} + {b_{n}\left( {x_{t_{n - 1}} + {b_{n - 1}x_{t_{n - 2}}} + {b_{n - 1}b_{n - 2}x_{t_{n - 3}}} + \ldots +} \right.}}} \\\left. {b_{n - 1}b_{n - 2}\ldots\mspace{11mu} b_{1}x_{t_{0}}} \right)\end{matrix}$

It can be observed thatA _(t) _(n−1) =x _(t) _(n−1) +b _(n−1) x _(t) _(n−2) +b _(n−1) b _(n−2)x _(t) _(n−3) + . . . +b _(n−1) b _(n−2) . . . b ₁ x _(t) ₀

Hence the sequential form can be obtained:A _(t) _(n) =x _(t) _(n) +b _(n) A _(t) _(n−1)

The sequential form for x _(t) _(n) can be derived

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + {\rho_{n}^{n - 1}b_{n}}}$

Substituting for b_(n)

$\begin{matrix}{{\overset{\_}{x}}_{t_{n}} = {{u_{t_{n}}x_{t_{n}}} + {{u_{t_{n}}\left\lbrack \frac{u_{t_{n - 1}}\left( {1 - u_{t_{n}}} \right)}{u_{t_{n}}} \right\rbrack}A_{t_{n - 1}}}}} \\{= {{u_{t_{n}}x_{t_{n}}} + {\left( {1 - u_{t_{n}}} \right)\left\lbrack {u_{t_{n - 1}}A_{t_{n - 1}}} \right\rbrack}}} \\{= {{u_{t_{n}}x_{t_{n}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{x}}_{t_{n - 1}}}}}\end{matrix}$

Hence the sequential form is obtained:x _(t) _(n) =u _(t) _(n) x _(t) _(n) +(1−u _(t) _(n) ) x _(t) _(n−1)

The sequential formula converges to a fixed point if the time intervalis fixed at the average time interval q:

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + \left( {1 - \alpha} \right)^{q}}$

The fixed point of the sequence isu=1−(1−α)^(q)

For numerical stability, i.e. to avoid underflow of the double precisionfloating point representation when t_(k)−t_(k−1) is large, the timeintervals can be scaled proportionally so that the average time intervalq is scaled close to 1. If q is scaled to exactly 1, u=α is obtained.

The fixed point u can be used as the initial value:u _(t) ₀ =1−(1−α)^(q)Hanzak's Adjustment Factor for Time-Close Intervals

One can add an adjustment factor ρ_(n) ^(i) to the weights to tune theresponse of the filter:

${\overset{\_}{x}}_{t_{n}} = {u_{t_{n}}A_{t_{n}}}$$u_{t_{n}} = \frac{1}{\sum\limits_{i = 0}^{n}\;{\rho_{n}^{i}\left( {1 - \alpha} \right)}^{({t_{n} - t_{i}})}}$$A_{t_{n}} = {\sum\limits_{i = 0}^{n}\;{{\rho_{n}^{i}\left( {1 - \alpha} \right)}^{({t_{n} - t_{i}})}x_{t_{i}}}}$

Expanding the series

$\begin{matrix}{\frac{1}{u_{t_{n}}} = {1 + {\rho_{n}^{n - 1}b_{n}} + {\rho_{n}^{n - 2}b_{n}b_{n - 1}} + \ldots + {\rho_{n}^{0}b_{n}b_{n - 1}\ldots\; b_{1}}}} \\{= {1 + {\rho_{n}^{n - 1}{b_{n}\left( {1 + {\frac{\rho_{n}^{n - 2}}{\rho_{n}^{n - 1}}b_{n - 1}} + \ldots + {\frac{\rho_{n}^{0}}{\rho_{n}^{n - 1}}b_{n - 1}\ldots\mspace{11mu} b_{1}}} \right)}}}}\end{matrix}$

If

$\rho_{n}^{n} = {{1\mspace{14mu}{and}\mspace{14mu}\rho_{l}^{m}} = \frac{\rho_{n}^{m}}{\rho_{n}^{l}}}$then

$\frac{1}{u_{t_{n}}} = {1 + {\rho_{n}^{n - 1}{b_{n}\left( {1 + {\rho_{n - 1}^{n - 2}b_{n - 1}} + \ldots + {\rho_{n - 1}^{0}b_{n - 1}\;\ldots\; b_{1}}} \right)}}}$$\frac{1}{u_{t_{n}}} = {1 + \frac{\rho_{n}^{n - 1}b_{n}}{u_{t_{n - 1}}}}$

The sequential form can be derived:

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + {\rho_{n}^{n - 1}b_{n}}}$

Hanzak (cited above) added an adjustment factor ρ_(n) ^(i) given belowthat satisfies the equalities

$\rho_{n}^{n} = {{1\mspace{14mu}{and}\mspace{14mu}\rho_{l}^{m}} = {\frac{\rho_{n}^{m}}{\rho_{n}^{l}}:}}$

$\rho_{n}^{i} = \frac{t_{i} - t_{i - 1}}{t_{n} - t_{n - 1}}$

This adjustment factor improves the robustness of the filter when theseries include time-close samples, samples with time intervals muchsmaller than the average time interval. The factor ρ_(n) ^(i) increasesthe relative weight of a sample point x_(t) _(i) in the past if thecorresponding sampling interval t_(i)−t_(i−1) is larger than the currentsampling interval t_(n)−t_(n−1). It compensates for higher relativeintensity of noise due to the division by a random time-close intervalin the rate estimates.

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + {\left( \frac{t_{n - 1} - t_{n - 2}}{t_{n} - t_{n - 1}} \right)b_{n}}}$

The expression for b_(n) that will be used subsequently is:

$b_{n} = \frac{u_{t_{n - 1}}\left( {1 - u_{t_{n}}} \right)}{\rho_{n}^{n - 1}u_{t_{n}}}$

Similarly expanding the series

$\begin{matrix}{A_{t_{n}} = {x_{t_{n}} + {\rho_{n}^{n - 1}b_{n}x_{t_{n - 1}}} + {\rho_{n}^{n - 2}b_{n}b_{n - 1}x_{t_{n - 2}}} + \ldots +}} \\{\rho_{n}^{0}b_{n}b_{n - 1}\mspace{14mu}\ldots\mspace{14mu} b_{1}x_{t_{0}}} \\{= {x_{t_{n}} + {\rho_{n}^{n - 1}{b_{n}\left( {x_{t_{n - 1}} + {\frac{\rho_{n}^{n - 2}}{\rho_{n}^{n - 1}}b_{n - 1}x_{t_{n - 2}}} + \ldots +} \right.}}}} \\\left. {\frac{\rho_{n}^{0}}{\rho_{n}^{n - 1}}b_{{n - 1}\mspace{14mu}}\ldots\mspace{14mu} b_{1}x_{t_{0}}} \right) \\{= {x_{t_{n}} + {\rho_{n}^{n - 1}{b_{n}\left( {x_{t_{n - 1}} + {\rho_{n - 1}^{n - 2}b_{n - 1}x_{t_{n - 2}}} + \ldots +} \right.}}}} \\\left. {\rho_{n - 1}^{0}b_{{n - 1}\mspace{14mu}}\ldots\mspace{14mu} b_{1}x_{t_{0}}} \right) \\{= {x_{t_{n}} + {\rho_{n}^{n - 1}b_{n}A_{t_{n - 1}}}}}\end{matrix}$

The sequential form is obtained:

$\begin{matrix}{A_{t_{n}} = {x_{t_{n}} + {\rho_{n}^{n - 1}b_{n}A_{t_{n - 1}}}}} \\{= {x_{t_{n}} + {\left( \frac{t_{n - 1} - t_{n - 2}}{t_{n} - t_{n - 1}} \right)b_{n}A_{t_{n - 1}}}}}\end{matrix}$

The sequential form for x _(t) _(n) is derived:

$\begin{matrix}{{\overset{\_}{x}}_{t_{n}} = {u_{t_{n}}A_{t_{n}}}} \\{= {u_{t_{n}}\left( {x_{t_{n}} + {\rho_{n}^{n - 1}b_{n}A_{t_{n - 1}}}} \right)}}\end{matrix}$

Substituting for b_(n)

$\begin{matrix}{{\overset{\_}{x}}_{t_{n}} = {{u_{t_{n}}x_{t_{n}}} + {\rho_{n}^{n - 1}{u_{t_{n}}\left\lbrack \frac{u_{t_{n - 1}}\left( {1 - u_{t_{n}}} \right)}{\rho_{n}^{n - 1}u_{t_{n}}} \right\rbrack}A_{t_{n - 1}}}}} \\{= {{u_{t_{n}}x_{t_{n}}} + {\left( {1 - u_{t_{n}}} \right)\left\lbrack {u_{t_{n - 1}}A_{t_{n - 1}}} \right\rbrack}}} \\{= {{u_{t_{n}}x_{t_{n}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{x}}_{t_{n - 1}}}}}\end{matrix}$

Hence the sequential form is obtained:x _(t) _(n) =u _(t) _(n) x _(t) _(n) +(1−u _(t) _(n) ) x _(t) _(n−1)

Notably, the parameter ρ_(n) ^(n−1) appears in the sequential form foru_(t) _(n) but is not part of the sequential form for x _(t) _(n) .

The initial value with the average time interval q scaled close to 1 isused:ρ₀ ⁻¹=1u _(t) ₀ =1−ρ₀ ⁻¹(1−α)^(q)Adjustment Factors for Measurement Time and Run Time Intervals

Some classes of resource measure involve non-negligible measurement timewhich should be accounted for in the filters. For example, memory heapusage measurement process involves full garbage collection of the unusedheap to measure the actual usage. The measurement time of the heap usageincreases as the size of the heap increases. In some processes the runtime does not overlap with the measurement time, which is the case forheap usage measurement when the applications in a JVM are frozen duringthe full garbage collection. Therefore, the time interval(t_(n)−t_(n−1)) should be split into non-overlapping run time(t_(n)−t′_(n−1)) and measurement time (t′_(n−1)−t_(n−1)), wheret′_(n)>t_(n). Here the timestamp t_(n) denotes the start of the nth fullgarbage collection cycle while t′_(n) denotes the end of the nth fullgarbage collection cycle:t _(n) −t _(n−1)=(t _(n) −t′ _(n−1))+(t′ _(n−1) −t _(n−1))

The rate of change of heap usage measure may have been defined asfollows if it is assumed that the process excludes the measurement timeinterval when heap allocation activities are frozen, i.e. thedenominator is the process run time interval excluding measurement time:

$M_{t_{n}} = \left( \frac{{\overset{\_}{X}}_{t_{n}} - {\overset{\_}{X}}_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}} \right)$

Hence the ratio of the run times

$\frac{t_{i} - t_{i - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}}$can be used in the adjustment factor:

$\rho_{n}^{i} = \left( \frac{t_{i} - t_{i - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$Using the Adjustment Factor in Rate Filter (Avoiding CauchyDistribution)

The Holt filter can be denoted by the parameterized linear operatorH(x_(t) _(i) ,β), where the parameter x_(t) _(i) is a sequence ofmeasures, which is the sum of a signal term and an error term:

x_(t_(i)) = x̂_(t_(i)) + ɛ_(x_(t_(i)))

The estimation of measure X _(t) _(n) by the operator H(x_(t) _(i) ,β)is effective if the error term

ɛ_(x_(t_(i)))is Gaussian:

${\overset{\_}{X}}_{t_{n}} = {{H\left( {x_{t_{i}},\beta} \right)} = {{H\left( {{\hat{x}}_{t_{i}},\beta} \right)} + {H\left( {ɛ_{x_{t_{i}}},\beta} \right)}}}$$ɛ_{{\overset{\_}{X}}_{t_{n}}} = {{H\left( {ɛ_{x_{t_{i}}},\beta} \right)} \approx 0}$

In the estimation of the growth rate R _(t) _(n) from the raw growth

${r_{t_{n}} = \frac{x_{t_{n}} - x_{t_{n - 1}^{\prime}}}{t_{n} - t_{n - 1}^{\prime}}},$which involves a division by the random time interval t_(n)−t′_(n−1),the error term

ɛ_(r_(t_(n)))may be of Cauchy Distribution:

r_(t_(i)) = r̂_(t_(i)) + ɛ_(r_(t_(i)))${\overset{\_}{R}}_{t_{n}} = {{H\left( {r_{t_{i}},\beta} \right)} = {{H\left( {{\hat{r}}_{t_{i}},\beta} \right)} + {H\left( {ɛ_{r_{t_{i}}},\beta} \right)}}}$

The following derivation shows the adjustment factor

$\rho_{n}^{i} = \left( \frac{t_{i} - t_{i - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$reduces the error term to Gaussian:

R_(t_(n)) = v_(t_(n))B_(t_(n))$v_{t_{n}} = \frac{1}{\sum\limits_{i = 0}^{n}{\rho_{n}^{i}\left( {1 - \beta} \right)}^{({t_{n} - t_{i}^{\prime}})}}$$B_{t_{n}} = {\sum\limits_{i = 0}^{n}{{\rho_{n}^{i}\left( {1 - \beta} \right)}^{({t_{n} - t_{i}^{\prime}})}r_{t_{i}}}}$where$\rho_{n}^{i} = \left( \frac{t_{i} - t_{i - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$$r_{t_{i}} = \frac{x_{t_{i}} - x_{t_{i - 1}^{\prime}}}{t_{i} - t_{i - 1}^{\prime}}$

The factor t_(i)−t′_(i−1) in the denominator of t_(i)−t′_(i−1) and thenumerator of ρ_(n) ^(i) cancel out, giving

$B_{t_{n}} = {\frac{1}{\left( {t_{n} - t_{n - 1}^{\prime}} \right)}{\sum\limits_{i = 0}^{n}\;{\left( {1 - \beta} \right)^{({t_{n} - t_{n}^{\prime}})}\left( {x_{t_{i}} - x_{t_{i - 1}^{\prime}}} \right)}}}$$v_{t_{n}} = \frac{\left( {t_{n} - t_{n - 1}^{\prime}} \right)}{\sum\limits_{i = 0}^{n}\;{\left( {t_{i} - t_{i - 1}^{\prime}} \right)\left( {1 - \beta} \right)^{({t_{n} - t_{i}^{\prime}})}}}$

The factor (t_(n)−t′_(n−1)) in the denominator of B_(t) _(n) andnumerator of ν_(t) _(n) cancel out, producing

${\overset{\_}{R}}_{t_{n}} = \frac{\sum\limits_{i = 0}^{n}\;{\left( {x_{t_{i}} - x_{t_{i - 1}^{\prime}}} \right)\left( {1 - \beta} \right)^{({t_{n} - t_{i}^{\prime}})}}}{\sum\limits_{i = 0}^{n}\;{\left( {t_{i} - t_{i - 1}^{\prime}} \right)\left( {1 - \beta} \right)^{({t_{n} - t_{i}^{\prime}})}}}$

If the filter parameter β approaches zero.

${\lim\limits_{\beta\rightarrow 0}{\overset{\_}{R}}_{t_{n}}} = \frac{\sum\limits_{i = 0}^{n}\;\left( {x_{t_{i}} - x_{t_{i - 1}^{\prime}}} \right)}{\sum\limits_{i = 0}^{n}\;\left( {t_{i} - t_{i - 1}^{\prime}} \right)}$

Since x_(t) _(i) =x_(t′) _(i) , this gives

$\begin{matrix}{{\lim\limits_{\beta\rightarrow 0}{\overset{\_}{R}}_{t_{n}}} = \frac{\left( {x_{t_{n}} - x_{t_{n - 1}}} \right) + \left( {x_{t_{n - 1}} - x_{t_{n - 2}}} \right) + \ldots + \left( {x_{t_{1}} - x_{t_{0}}} \right)}{\left( {t_{n} - t_{n - 1}^{\prime}} \right) + \left( {t_{n - 1} - t_{n - 2}^{\prime}} \right) + \ldots + \left( {t_{1} - t_{0}^{\prime}} \right)}} \\{= \frac{x_{t_{n}} - x_{t_{0}}}{\left( {t_{n} - t_{0}} \right) - {\sum\limits_{i = 0}^{n}\;\left( {t^{\prime_{i}} - t_{i}} \right)}}}\end{matrix}$

Here the term Σ_(i=0) ^(n)(t′_(i)−t_(i)) is the total measurement timeinterval. If the measurement time is negligible, the formula convergesto the limit where the error term ε is Gaussian:

${\lim\limits_{\beta\rightarrow 0}{\overset{\_}{R}}_{t_{n}}} = {\frac{x_{t_{n}} - x_{t_{0}}}{t_{n} - t_{0}} + ɛ}$

Wright's extension for irregular time intervals alone in some casesmight not be sufficient for detecting a periodic pattern. The Hanzak'sadjustment factor for time-close intervals can be used to reduce thenoise induced by irregular time intervals to Gaussian noise level. Theclipping of outliers further improves the performance of the single(growth rate only) or double (growth rate and acceleration) filters.

Adjustment Factors

The adjustment factor for time close intervals, which is meant tocompensate for higher relative intensity of noise due to a randomtime-close interval in the rate estimate, can inadvertently dampen therate of change estimates if the time interval decreases monotonicallyduring a congestion caused by memory leaks or deadlocks. In case ofmemory leaks, as the time interval decreases the run time decreases butthe measurement time increases because the JAVA virtual machine (JVM) isfrozen longer for full garbage collection (GC). If the JVM is frozenduring full GC, new requests are queued up outside the JVM (with someportion redistributed to other JVMs). The backlog can accelerate therate of change of the heap usage during the subsequent run time.

One way to compensate for this backlog is to include the ratio ofmeasurement times

$\frac{t_{i - 1}^{\prime} - t_{i - 1}}{t_{n - 1}^{\prime} - t_{n - 1}}$in the adjustment factor:

$\rho_{n}^{i} = {\left( \frac{t_{i} - t_{i - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)\left( \frac{t_{i - 1}^{\prime} - t_{i - 1}}{t_{n - 1}^{\prime} - t_{n - 1}} \right)}$

This factor decreases the relative weight of a sample point x_(t) _(i)in the past if its measurement time (i.e. the full GC time)t′_(i−1)−t_(i−1) is shorter than the measurement time t′_(n−1)−t_(n−1)corresponding to the current sample point x_(t) _(n) . The ratio ofmeasurement times

$\frac{t_{i - 1}^{\prime} - t_{i - 1}}{t_{n - 1}^{\prime} - t_{n - 1}} < 1$is expected to cancel out the ratio of run times

${\frac{t_{i - 1} - t_{i - 1}^{\prime}}{t_{n - 1} - t_{n - 1}^{\prime}} > 1},$and provide a quicker response to the trends. Hence the new adjustmentfactors can give more weights to the more recent sample points when themeasurement time is increasing. These adjustment factors reduce toHanzak's adjustment factor if the measurement time is a negligibleconstant and the time interval is comprised mostly by the run time.

Mathematically,

${\rho_{n}^{n} = {{1\mspace{14mu}{and}\mspace{14mu}\rho_{l}^{m}} = \frac{\rho_{n}^{m}}{\rho_{n}^{l}}}},$and so the filter can be reduced to the desired sequential form:

$\rho_{n}^{n} = {{\left( \frac{t_{n} - t_{n - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)\left( \frac{t_{n - 1}^{\prime} - t_{n - 1}}{t_{n - 1}^{\prime} - t_{n - 1}} \right)} = 1}$$\begin{matrix}{\frac{\rho_{n}^{m}}{\rho_{n}^{l}} = {\left\lbrack \frac{\left( \frac{t_{m} - t_{m - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)}{\left( \frac{t_{l} - t_{l - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)} \right\rbrack\left\lbrack \frac{\left( \frac{t_{m - 1}^{\prime} - t_{m - 1}}{t_{n - 1}^{\prime} - t_{n - 1}} \right)}{\left( \frac{t_{l - 1}^{\prime} - t_{l - 1}}{t_{n - 1}^{\prime} - t_{n - 1}} \right)} \right\rbrack}} \\{= {\left( \frac{t_{m} - t_{m - 1}^{\prime}}{t_{l} - t_{l - 1}^{\prime}} \right)\left( \frac{t_{m - 1}^{\prime} - t_{m - 1}}{t_{l - 1}^{\prime} - t_{l - 1}} \right)}} \\{= \rho_{l}^{m}}\end{matrix}$

The filter parameter ν_(t) _(n) is then given by the sequential form:

$\begin{matrix}{v_{t_{n}} = \frac{v_{t_{n - 1}}}{v_{t_{n - 1}} + {\rho_{n}^{n - 1}b_{n}}}} \\{= \frac{v_{t_{n - 1}}}{v_{t_{n - 1}} + {\left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)\left( \frac{t_{n - 2}^{\prime} - t_{n - 2}}{t_{n - 1}^{\prime} - t_{n - 1}} \right)b_{n}}}}\end{matrix}$

If the measurement time is monotonically decreasing, the followingadjustment factors can be used:

$\rho_{n}^{i} = {\left( \frac{t_{i} - t_{i - 1}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)\left( \frac{t_{n - 1}^{\prime} - t_{n - 1}}{t_{i - 1}^{\prime} - t_{i - 1}} \right)}$Applying Holt's Method

Holt's double exponential moving averages include three time series:smoothed resource measure X _(i), locally linear trend M _(i), and locallinear forecast G _(i), given the constants α,0<α<1 and β,0<β<1:X _(n) =αx _(n)+(1−α) G _(n)M _(n)=β( X _(n) − X _(n−1))+(1−β) M _(n−1)G _(n) = X _(n−1) + M _(n−1)

Winters added a third exponential moving average to Holt's doubleexponential moving averages to incorporate the seasonal trend.Holt-Winters' triple exponential moving averages for a seasonal period Land the constants 0<α<1,0<β<1,0<γ<1 are:

${\overset{\_}{X}}_{n} = {{\alpha\frac{x_{n}}{{\overset{\_}{C}}_{n - L}}} + {\left( {1 - \alpha} \right){\overset{\_}{G}}_{n}}}$${\overset{\_}{M}}_{n} = {{\beta\left( {{\overset{\_}{X}}_{n} - {\overset{\_}{X}}_{n - 1}} \right)} + {\left( {1 - \beta} \right){\overset{\_}{M}}_{n - 1}}}$${\overset{\_}{C}}_{n} = {{\gamma\frac{x_{n}}{{\overset{\_}{X}}_{n}}} + {\left( {1 - \gamma} \right){\overset{\_}{C}}_{n - L}}}$${\overset{\_}{G}}_{n} = {{\overset{\_}{X}}_{n - 1} + {\overset{\_}{M}}_{n - 1}}$${\overset{\_}{F}}_{n} = {\left\lbrack {{\overset{\_}{X}}_{n - 1} + {\overset{\_}{M}}_{n - 1}} \right\rbrack{\overset{\_}{C}}_{n - L}}$

Here G _(n) represents a local linear forecast while F _(n) represents acombination of linear and seasonal forecast. For capacity monitoring,long term linear trend can be used for forecasting resourcerequirements, such as memory, thread, connection, socket, buffer, diskspace, network bandwidth, etc.

Smoothed Measure

The first of the double exponential moving averages can be used tosmooth out the raw resource measure. In this case Wright's formula canbe used to filter the raw resource measure x_(t) _(n) given a constantα,0<α<1:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}x_{t_{n}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + {\rho_{n}^{n - 1}a_{n}}}$a_(n) = (1 − α)^((t_(n) − t_(n − 1)))$\rho_{n}^{n - 1} = {\left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)\varphi_{n}^{n - 1}}$φ_(n)^(n − 1) = 1

Other useful formulae for the factor φ_(n) ^(n−1) (depending on whetherthe measurement time interval is increasing or decreasing):

$\varphi_{n}^{n - 1}\left\{ \begin{matrix}\left( \frac{t_{n - 2}^{\prime} - t_{n - 2}}{t_{n - 1}^{\prime} - t_{n - 1}} \right) \\\left( \frac{t_{n - 1}^{\prime} - t_{n - 1}}{t_{n - 2}^{\prime} - t_{n - 2}} \right)\end{matrix} \right.$Locally Linear Trend

The second of the double exponential moving averages represents locallylinear rate of change of the resource measure. Since the rate of change

$\left( \frac{{\overset{\_}{x}}_{t_{n}} - {\overset{\_}{x}}_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}} \right)$involves a division by the length of time interval t_(n)−t′_(n−1), theadjustment factors ρ_(n) ^(n−1) can be included to filter the rate ofchange M _(t) _(n) given a constant β,0<β<1:

${\overset{\_}{M}}_{t_{n}} = {{v_{t_{n}}\left( \frac{{\overset{\_}{X}}_{t_{n}} - {\overset{\_}{X}}_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}} \right)} + {\left( {1 - v_{t_{n}}} \right){\overset{\_}{M}}_{t_{n - 1}}}}$$v_{t_{n}} = \frac{v_{t_{n - 1}}}{v_{t_{n - 1}} + {\rho_{n}^{n - 1}b_{n}}}$b_(n) = (1 − β)^((t_(n) − t_(n − 1)))$\rho_{n}^{n - 1} = {\left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)\varphi_{n}^{n - 1}}$φ_(n)^(n − 1) = 1

The series G _(t) _(n) represents the local linear forecasted resourcemeasure based on the linear trend:G _(t) _(n) = X _(t) _(n−1) + M _(t) _(n−1) (t _(n) −t _(n−1))

The initial values of X _(t) ₀ and M _(t) ₀ are computed:

${\overset{\_}{X}}_{t_{0}} = x_{t_{0}}$${{\overset{\_}{M}}_{t_{0}} = \frac{x_{t_{0}} - x_{t_{- q}}}{t_{0} - t_{- q}}},{\left( {t_{0} - t_{- q}} \right) > {15\mspace{14mu}{{minutes}\;.}}}$

This linear equation can be used to predict the time t after t_(n) whenthe resource measure (heap usage or thread or stack segment intensity)might cross the threshold X_(max):

$X_{\max} = {{\overset{\_}{X}}_{t_{n}} + {{\overset{\_}{M}}_{t_{n}}\left( {t - t_{n}} \right)}}$$t = {t_{n} + \frac{X_{\max} - {\overset{\_}{X}}_{t_{n}}}{{\overset{\_}{M}}_{t_{n}}}}$Growth Rate and Acceleration of Resource Measure

Double exponential moving averages can be applied to the firstderivative and second derivative of the resource measure to monitoraccelerating resource congestions (due to memory leaks or threaddeadlocks).

The rate of change of resource measure r_(t) _(n) can be filtered in thefirst of the double exponential moving averages. This filter can monitorthe long term gradual growth in resource measure. Since the rate ofchange

$r_{t_{n}} = \frac{x_{t_{n}} - x_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}}$involves a division by the length of time interval t_(n)−t′_(n−1),adjustment factors μ_(n) ^(n−1) can be included to filter the rate ofchange:

$r_{t_{n}} = \frac{x_{t_{n}} - x_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}}$${\overset{\_}{R}}_{t_{n}} = {{v_{t_{n}}r_{t_{n}}} + {\left( {1 - v_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$$v_{t_{n}} = \frac{v_{t_{n - 1}}}{v_{t_{n - 1}} + {\mu_{n}^{n - 1}b_{n}}}$b_(n) = (1 − β)^((t_(n) − t_(n − 1)))$\mu_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$

The second derivative s_(t) _(n) (rate of rate of change) also involvesa division by length of time interval t_(n)−t_(n−1).

$s_{t_{n}} = \frac{{\overset{\_}{R}}_{t_{n}} - {\overset{\_}{R}}_{t_{n - 1}}}{t_{n} - t_{n - 1}}$

The Hanzak adjustment factor ρ_(n) ^(n−1) can be included to filter therate of rate of change:

${\overset{\_}{S}}_{t_{n}} = {{w_{t_{n}}s_{t_{n}}} + {\left( {1 - w_{t_{n}}} \right){\overset{\_}{S}}_{t_{n - 1}}}}$$w_{t_{n}} = \frac{w_{t_{n - 1}}}{w_{t_{n - 1}} + {\sigma_{n}^{n - 1}c_{n}}}$c_(n) = (1 − κ)^((t_(n) − t_(n − 1)))$\sigma_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}}{t_{n} - t_{n - 1}} \right)$

The series G _(t) _(n) represents the forecasted rate of change ofresource measure based on the linear trend in rate of change:G _(t) _(n) = R _(t) _(n−1) + S _(t) _(n−1) (t _(n) −t _(n−1))

The forecasted resource measure F _(t) _(n) is given by:F _(t) _(n) =x _(t) _(n−1) + R _(t) _(n−1) (t _(n) −t _(n−1))

The smoothed rate R _(t) _(n) can be used to predict the time t aftert_(n) when the resource measure might cross the threshold X_(max) asfollows:

$X_{\max} = {x_{t_{n}} + {{\overset{\_}{R}}_{t_{n}}\left( {t - t_{n}} \right)}}$$t = {t_{n} + \frac{X_{\max} - x_{t_{n}}}{{\overset{\_}{R}}_{t_{n}}}}$Outlier Detection and Clipping

On top of the double and triple exponential moving averages, two moreexponential moving averages can be introduced to filter the series forresidual error Ē_(t) _(n) and absolute deviation D _(t) _(n) . Given onestep linear with or without seasonal factor forecasted resource measureF _(t) _(n) based on the trend M _(t) _(n) (in algorithm 1 formonitoring measure and rate) or R _(t) _(n) (in algorithm 2 formonitoring rate and acceleration):

${\overset{\_}{F}}_{t_{n}} = \left\{ \begin{matrix}{{\overset{\_}{X}}_{t_{n - 1}} + {{\overset{\_}{M}}_{t_{n - 1}}\left( {t_{n} - t_{n - 1}} \right)}} \\{\left\lbrack {{\overset{\_}{X}}_{t_{n - 1}} + {{\overset{\_}{M}}_{t_{n - 1}}\left( {t_{n} - t_{n - 1}} \right)}} \right\rbrack{\overset{\_}{C}}_{\tau_{n} - L}} \\{x_{t_{n - 1}} + {{\overset{\_}{R}}_{t_{n - 1}}\left( {t_{n} - t_{n - 1}} \right)}}\end{matrix} \right.$

The residual error of forecasted resource measure can be calculated:e _(t) _(n) = F _(t) _(n) −x _(t) _(n)Ē _(t) _(n) =ψ_(t) _(n) e _(t) _(n) +(1−ψ_(t) _(n) )Ē _(t) _(n−1)D _(t) _(n) =ψ_(t) _(n) |e _(t) _(n) |+(1−ψ_(t) _(n) ) D _(t) _(n−1)

Significantly, D _(t) _(n) ≧Ē_(t) _(n) for each n. Wright's formula canbe used to update the filter parameters given a constant δ,0<δ<1:

$\psi_{t_{n}} = \frac{\psi_{t_{n - 1}}}{\psi_{t_{n - 1}} + d_{n}}$d_(n) = (1 − δ)^((t_(n) − t_(n − 1)))

The normalized residual is given by

$\frac{e_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}}}{{\overset{\_}{D}}_{t_{n - 1}}}$

The sample x_(t) _(n) is identified as an outlier if the correspondingnormalized residual is greater than a cutoff value Q, i.e.

${{\frac{e_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}}}{{\overset{\_}{D}}_{t_{n - 1}}}} > Q},{Q > 1}$

In certain embodiments, the normalized residual cutoff value Q can beadjusted proportionally to the time interval if the interval is greaterthan a threshold α,α≧1, i.e. given a default cutoff value Q_(def), thenormalized residual cutoff value Q is computed:

$Q = \left\{ \begin{matrix}{{\left( {t_{n} - t_{n - 1}} \right)Q_{def}},} & {\left( {t_{n} - t_{n - 1}} \right) > a} \\{Q_{def},} & {\left( {t_{n} - t_{n - 1}} \right) \leq a}\end{matrix} \right.$This formula for adjusting the normalized residual cutoff valueeffectively increasing the tolerance for the outlier measurement as theforecast horizon extends out, i.e. as t_(n)−t_(n−1) increases. It is anexpression of how the confidence level of a forecasted measure candecrease as the forecast horizon extends out.

If x_(t) _(n) is identified as an outlier, then the sample can beclipped to a value x′_(t) _(n) , x_(max)≧x′_(t) _(n) ≧x_(min), accordingto the following rules:If Ē _(t) _(n−1) <0 and e _(t) _(n) <Ē _(t) _(n−1) and |e _(t) _(n) −Ē_(t) _(n−1) |>Q D _(t) _(n−1) ,then x′ _(t) _(n) =MIN( F _(t) _(n) −Ē _(t) _(n−1) +Q D _(t) _(n−1) ,x_(max)).If Ē _(t) _(n−1) <0 and Ē _(t) _(n−1) <e _(t) _(n) <0,then |e _(t) _(n) −Ē _(t) _(n−1) |<Q D _(t) _(n−1) so x _(t) _(n) is notan outlier.If Ē _(t) _(n−1) <0 and 0<e _(t) _(n) ,then x′ _(t) _(n) =MAX( F _(t) _(n) −Ē _(t) _(n−1) −Q D _(t) _(n−1) ,x_(min)).If 0<Ē _(t) _(n−1) and Ē _(t) _(n−1) <e _(t) _(n) and |e _(t) _(n) −Ē_(t) _(n−1) |>Q D _(t) _(n−1) ,then x′ _(t) _(n) =MAX( F _(t) _(n) −Ē _(t) _(n−1) −Q D _(t) _(n−1) ,x_(min)).If 0<Ē _(t) _(n−1) and 0<e _(t) _(n) <Ē _(t) _(n−1) ,then |e _(t) _(n) −Ē _(t) _(n−1) |<Q D _(t) _(n−1) so x _(t) _(n) is notan outlier.If 0<Ē _(t) _(n−1) and e _(t) _(n) <0,then x′ _(t) _(n) =MIN( F _(t) _(n) −Ē _(t) _(n−1) +Q D _(t) _(n−1) ,x_(max)).

These conditions are summarized in:

$x_{t_{n}}^{\prime}:=\left\{ \begin{matrix}{{MIN}\left( {{{\overset{\_}{F}}_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}} + {Q\mspace{14mu}{\overset{\_}{D}}_{t_{n - 1}}}},x_{\max}} \right)} & {when} & {e_{t_{n}} < {{MIN}\left( {E_{t_{n - 1}},0} \right)}} \\{{MAX}\left( {{{\overset{\_}{F}}_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}} - {Q\mspace{14mu}{\overset{\_}{D}}_{t_{n - 1}}}},x_{\min}} \right)} & {when} & {e_{t_{n}} < {{MAX}\left( {E_{t_{n - 1}},0} \right)}}\end{matrix} \right.$

In these expressions the smoothed residual error term Ē_(t) _(n)represents the bias of the filter. This bias information is compensatedby the centered forecast F′_(t) _(n) = F _(t) _(n) −Ē_(t) _(n−1) .e _(t) _(n) −Ē _(t) _(n−1) = F _(t) _(n) −x _(t) _(n) −Ē _(t) _(n−1) =F′ _(t) _(n) −x _(t) _(n)

Hence the normalized residual |e_(t) _(n) −Ē_(t) _(n−1) |>Q D _(t)_(n−1) is equivalent to the residual of centered forecast | F′_(t) _(n)−x_(t) _(n) |>Q D _(t) _(n−1) . The clipped outlier measure x′_(t) _(n)is given by shifting the centered forecast F′_(t) _(n) by ±Q D _(t)_(n−1) .

The bias represents level change. A short duration spike or dip of biasrepresents permanent level shift. A bias that spikes and dips insuccession represents level spikes or temporary level shifts. Apersistent negative bias represents upward level drift and a persistentpositive bias represents downward level drift. A persistent largeabsolute deviation represents high variance change. Bias, absolutedeviation (representing 1-sigma and 2-sigma), and outliers can beplotted as a Shewhart control chart. Persistent level drift, highvariance change, and clusters of outliers, which can be clearly visiblein a Shewhart control chart and can be detected by simple rule-basedclassification schemes, usually represent anomalies in the system. Theanomalies can be identified and raised to be diagnosed by higher levelclassification and assessment schemes.

Seasonal Trend

When monitoring the heap usage or thread or stack segment intensity,weekend and weekday seasons can be tracked separately. This is based onthe rationale that the seasonal peaks occur only in the weekdays whilesome trends may spill into the weekends when the users are distributedin different time zones (such as for multinational organizations). Thelength of the weekend seasons should be 48 hours and the length of theweekday seasons should be 24 hours. The seasonal factors B _(t) _(n) canbe used when updating the moving averages in the weekends and seasonalfactors C _(t) _(n) can be used when updating the moving averages in theweekdays. If a resolution of 15 minutes is used, i.e. the seasonal indexis integer multiples of 15 minutes, to track the seasonal factors B _(t)_(n) (for 48 hours) and C _(t) _(n) (for 24 hours), then this producesT=192 and T=96 indices, respectively, for the seasonal factors. When thetime is advanced from t_(n−1) to t_(n), the seasonal index shall beadvanced in multiples of 15 minutes, i.e. indexτ_(n)=[[(t_(n)−t_(12 AM)) div 15 minutes] mod 7], assuming t is given inminutes. Generally the seasonal index is a map parameterized byresolution Δ_(τ) and period T:τ_(n)=τ(t _(n))=[[(t _(n) −t _(12 AM))div Δ_(τ)] mod T]

The exponential moving averages of seasonal factors for a constantγ,0<γ<1, are given for the weekends and weekdays. In the weekends, theseasonal factor is tracked by the following filter where K (set to 192if Δ_(τ) is 15 minutes) is the periodicity of the weekend seasons:

$\left. {\overset{\_}{B}}_{\tau_{n}}\leftarrow{{\gamma\frac{x_{t_{n}}}{{\overset{\_}{X}}_{t_{n}}}} + {\left( {1 - \gamma} \right){\overset{\_}{B}}_{\tau_{n}}}} \right.$τ_(n) = τ(t_(n)) = [[(t_(n) − t_(12AM))div Δ_(τ)]mod  K]

In the weekdays, the seasonal factor is tracked by the following filterwhere L (set to 96 if Δ_(τ) is 15 minutes) is the periodicity of theweekday seasons:

$\left. {\overset{\_}{C}}_{\tau_{n}}\leftarrow{{\gamma\frac{x_{t_{n}}}{{\overset{\_}{X}}_{t_{n}}}} + {\left( {1 - \gamma} \right){\overset{\_}{C}}_{\tau_{n}}}} \right.$τ_(n) = τ(t_(n)) = [[(t_(n) − t_(12AM))div Δ_(τ)]mod  L]

The above two filters track the percentage deviation of the raw samplex_(t) _(n) above or below the deseasonalized average X _(t) _(n) . Theseasonal factors shall be renormalized at the end of each weekday orweekend season so that the average of the factors over one week cycle is1, i.e. divide each weekend factor B _(k) and weekday factor C _(l) bythe normalization factor:

$\frac{1}{K + {5L}}\left( {{\sum\limits_{k = 0}^{K - 1}{\overset{\_}{B}}_{k}} + {5{\sum\limits_{l = 0}^{L - 1}{\overset{\_}{C}}_{l}}}} \right)$Optionally, we can fit a smooth spline to the seasonal factors at theend of each season to smoothen the seasonal trend.At the end of each weekday or weekend season, we can rebalance therelative magnitudes of weekend and weekday seasonal factors by dividingeach seasonal factor B _(i) and C _(j) by the average daily measure:

$\frac{1}{5 + \left( {2*2} \right)}\left( {{\sum\limits_{d = 0}^{4}J_{d}} + {2*{\sum\limits_{e = 0}^{1}I_{e}}}} \right)$

When the raw value x_(t) _(n) is divided by the corresponding seasonalfactor B _(τ) _(n) or C _(τ) _(n) (tracking of the previous seasons andcurrent season), the updating process for X _(t) _(n) effectivelydeseasonalizes the average X _(t) _(n) . X _(t) _(n) is updated by oneof the two filters depending on whether the sample is in the weekends orweekdays.

The initial values of the weekend seasonal factors B _(k), for k=0, 1, .. . , K−1, are determined by first computing the average over eachweekend:

${I_{e} = {\frac{1}{N_{e}}{\sum\limits_{i = 1}^{N_{e}}x_{t_{i}}}}},{e = 0},1$

Here the samples x_(t) ₁ , . . . , x_(t) _(m) are those that fall withinthe corresponding weekend.

Secondly, compute the averages y _(k) of the samples that fall withinthe 15 minutes time interval corresponding to the weekend seasonal indexk:

${{\overset{\_}{y}}_{k} = {\frac{1}{N_{k}}{\sum\limits_{i = 1}^{N_{k}}x_{t_{i}}}}},{k = 0},1,\ldots\mspace{14mu},383$

Here the values y _(k) are the averages of the samples that fall withinthe 15 minutes time interval corresponding to the weekend seasonal index(k mod 192) of the weekend e=(k div 192).

Weekend 1 Weekend 2 0 y ₀/I₀ y ₁₉₂/I₁ 1 y ₁/I₀ y ₁₉₃/I₁ 2 y ₂/I₀ y₁₉₄/I₁ . . . 191  y ₁₉₁/I₀  y ₃₈₃/I₁

Then compute the weekend seasonal factors by averaging each row:

${\overset{\_}{B}}_{0} = {\frac{1}{2}\left( {{{\overset{\_}{y}}_{0}/I_{0}} + {{\overset{\_}{y}}_{192}/I_{1}}} \right)}$${\overset{\_}{B}}_{1} = {\frac{1}{2}\left( {{{\overset{\_}{y}}_{1}/I_{0}} + {{\overset{\_}{y}}_{193}/I_{1}}} \right)}$${\overset{\_}{B}}_{2} = {\frac{1}{2}\left( {{{\overset{\_}{y}}_{2}/I_{0}} + {{\overset{\_}{y}}_{194}/I_{1}}} \right)}$${\overset{\_}{B}}_{191} = {\frac{1}{2}\left( {{{\overset{\_}{y}}_{191}/I_{0}} + {{\overset{\_}{y}}_{383}/I_{1}}} \right)}$

The initial values of the weekday seasonal factors C _(l), for l=0, 1, .. . , L−1, are determined as follows:

First compute the averages of 5 workdays (Monday, Tuesday, Wednesday,Thursday, Friday):

${J_{d} = {\frac{1}{N_{d}}{\sum\limits_{i = 1}^{N_{d}}x_{t_{i}}}}},{d = 0},1,\ldots\mspace{14mu},4$

Here the samples x_(t) ₁ , . . . , x_(t) _(m) are those that fall withinthe corresponding day.

Second, divide the sample averages by the daily average for eachseasonal index

Monday Tuesday Wednesday Thursday Friday 0 z ₀/J₀ z ₉₆/J₁ z ₁₉₂/J₂ z₂₈₈/J₃ z ₃₈₄/J₄ 1 z ₁/J₀ z ₉₇/J₁ z ₁₉₃/J₂ z ₂₈₉/J₃ z ₃₈₅/J₄ 2 z ₂/J₀ z₉₈/J₁ z ₁₉₄/J₂ z ₂₉₀/J₃ z ₃₈₆/J₄ . . . 95  z ₉₅/J₀  z ₁₉₁/J₁  z ₂₈₇/J₂ z₃₈₃/J₃ z ₄₇₉/J₄

Here the values z _(l) are the averages of the samples that fall withinthe 15 minutes time interval corresponding to the weekday seasonal index(l mod 96) of the day d=(l div 96):

${{\overset{\_}{z}}_{l} = {\frac{1}{N_{l}}{\sum\limits_{i = 1}^{N_{l}}x_{t_{i}}}}},{l = 0},1,\ldots\mspace{14mu},479$

Third, the weekday seasonal factors are computed by averaging each row:

${\overset{\_}{C}}_{0} = {\frac{1}{5}\left( {{{\overset{\_}{z}}_{0}/J_{0}} + {{\overset{\_}{z}}_{96}/J_{1}} + {{\overset{\_}{z}}_{192}/J_{2}} + {{\overset{\_}{z}}_{288}/J_{3}} + {{\overset{\_}{z}}_{384}/J_{4}}} \right)}$${\overset{\_}{C}}_{1} = {\frac{1}{5}\left( {{{\overset{\_}{z}}_{1}/J_{0}} + {{\overset{\_}{z}}_{97}/J_{1}} + {{\overset{\_}{z}}_{193}/J_{2}} + {{\overset{\_}{z}}_{289}/J_{3}} + {{\overset{\_}{z}}_{385}/J_{4}}} \right)}$${\overset{\_}{C}}_{2} = {\frac{1}{5}\left( {{{\overset{\_}{z}}_{2}/J_{0}} + {{\overset{\_}{z}}_{98}/J_{1}} + {{\overset{\_}{z}}_{194}/J_{2}} + {{\overset{\_}{z}}_{290}/J_{3}} + {{\overset{\_}{z}}_{386}/J_{4}}} \right)}$…${\overset{\_}{C}}_{95} = {\frac{1}{5}\left( {{{\overset{\_}{z}}_{95}/J_{0}} + {{\overset{\_}{z}}_{191}/J_{1}} + {{\overset{\_}{z}}_{287}/J_{2}} + {{\overset{\_}{z}}_{383}/J_{3}} + {{\overset{\_}{z}}_{479}/J_{4}}} \right)}$

To rebalance the relative magnitudes of weekend and weekday seasonalfactors, we divide each seasonal factor B _(i) and C _(j) by the averagedaily measure:

$\frac{1}{5 + \left( {2*2} \right)}\left( {{\sum\limits_{d = 0}^{4}J_{d}} + {2*{\sum\limits_{e = 0}^{1}I_{e}}}} \right)$

Moving average is updated in the weekends using:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{B}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$

Moving average is updated in the weekdays using:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{C}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$

In each case, the local linear forecast is:G _(t) _(n) = X _(t) _(n−1) + M _(t) _(n−1) (t _(n) −t _(n−1))

The initial value of X _(t) ₀ , if t₀ falls in a weekend, is:X _(t) ₀ = y _(τ) ₀τ₀=τ(t ₀)=[(t ₀ −t _(12 AM))div Δ_(τ)] mod K

If t₀ falls in a weekday:X _(t) ₀ = z _(τ) ₀τ₀=τ(t ₀)=[(t ₀ −t _(12 AM))div Δ_(τ)] mod L

The initial value of the linear trend M _(t) ₀ is computed from twoseasons of samples, i.e. between two consecutive weekdays or between twoconsecutive weekends, depending on whether t₀ falls in a weekend or on aweekday.

If t₀ falls in a weekend:

${\overset{\_}{M}}_{t_{0}} = \frac{y_{\tau_{0} + K} - {\overset{\_}{y}}_{\tau_{0}}}{K + {5L}}$

If t₀ falls on a weekday:

${\overset{\_}{M}}_{t_{0}} = \frac{{\overset{\_}{z}}_{\tau_{0} + L} - {\overset{\_}{z}}_{\tau_{0}}}{L}$

When a projection is made of the resource measure at time t after t_(n)by combining the smoothed resource measure, locally linear trend, andmultiplicative seasonal factor, the seasonal index can be projected by[(t−t_(n)) div 15 minutes], assuming t is given in minutes. Denoting theprojection of seasonal index by Δ, the linear and seasonal forecastF_(t) is obtained to time t using one of the following two formulaedepending on whether (τ_(n)+Δ) falls in the weekends or weekdays.

If both τ_(n) and (τ_(n)+Δ) fall in a weekend:F _(t) =[ X _(t) _(n) + M _(t) _(n) (t−t _(n))] B _(((τ) _(n)_(+Δ)mod K))

If both τ_(n) and (τ_(n)+Δ) fall among the consecutive weekdays:F _(t) =[ X _(t) _(n) + M _(t) _(n) (t−t _(n))] C _(((τ) _(n)_(+Δ)mod L))

A slightly more complex modulo arithmetic can be used if τ_(n) and(τ_(n)+Δ) fall in different seasons.

Multivariate Regression

The mean square error (MSE) residual and mean absolute deviation (MAD)of h-step forecasts can be defined as functions of independent variablesα,β,κ,γ,δ, and tz for a given time series x_(t). The parametertz,−12<tz<12, is the time zone offset from the east coast standard time(EST). After shifting by the time zone offset, the start of the weekendsshall correspond to Saturday 12 AM and the end of the weekends shallcorrespond to Monday 12 AM. The time zone offset can be optimized whenthe peaks and troughs of weekday activities across multiple time zonesare superimposed and the level in the middle of the weekends needs to becentered in the weekend season.

Non-linear multivariate regression can be applied to determine thevalues of α,β,κ,γ,δ, and tz that minimize the MSE or MAD for dataspanning 9 consecutive days or longer.

${M\; S\; E} = {{f\left( {\alpha,\beta,\kappa,\gamma,\delta,{t\; z},x_{t}} \right)} = \left( {\frac{1}{N}{\sum\limits_{n = 1}^{N}\left( e_{h,t_{n}} \right)}} \right)^{1/2}}$${M\; A\; D} = {{f\left( {\alpha,\beta,\kappa,\gamma,\delta,{t\; z},x_{t}} \right)} = {\frac{1}{N}{\sum\limits_{n = 1}^{N}{e_{h,t_{n}}}}}}$

In all expressions, the time stamps are shifted by tz offset andproportionally scaled. The scaling factor is determined such that theaverage time interval q is scaled close to 1.

The expected average time interval can be denoted by ∇:

∇ = E[T_(k) − T_(k − 1)]$t_{n} = {\frac{1}{\nabla}\left( {T_{n} + {t\; z}} \right)}$$q = {{\frac{1}{\nabla}\left( {{\frac{1}{N}{\sum\limits_{k = 1}^{N}T_{k}}} - T_{k - 1}} \right)} \approx 1}$Simple Extended Holt-Winter Seasonal Filter

For capacity monitor, the residual error series ise _(h,t) _(n) = F _(h,t) _(n) −x _(t) _(n)

Here h-step forecast F _(h,t) _(n) is based on the smoothed measure X_(t) _(n−h) , the linear trend M _(t) _(n−h) , and the seasonal factorsB _(τ) _(n) or C _(τ) _(n) depending on whether t_(n) falls in a weekendor on a weekday:F _(h,t) _(n) =[ X _(t) _(n−h) + M _(t) _(n−h) (t _(n) −t _(n−h))] B_(τ) _(n)F _(h,t) _(n) =[ X _(t) _(n−h) + M _(t) _(n−h) (t _(n) −t _(n−h))] C_(τ) _(n)

Equation set for the first exponential moving average (as derived in theprevious sections) for the observed measure is given as follows.

Moving average of deseasonalized measure is updated in the weekendsusing:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{B}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$

Moving average of deseasonalized measure is updated in the weekdaysusing:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{C}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$

Note that the time t_(n) is shifted by the tz offset before scaling. Theweekend formula is used if t_(n) is between 12 AM Saturday and 12 AMMonday.

The filter parameters are:

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + {\rho_{n}^{n - 1}a_{n}}}$a_(n) = (1 − α)^((t_(n) − t_(n − 1)))$\rho_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\;\prime}} \right)$

The initial value of X _(t) ₀ , if t₀ falls in a weekend:X _(t) ₀ = y _(τ) ₀τ₀=τ(t ₀)=[(t ₀ −t _(12 AM))div Δ_(τ)] mod K

If t₀ falls in a weekend:X _(t) ₀ = z _(τ) ₀τ₀=τ(t ₀)=[(t ₀ −t _(12 AM))div Δ_(τ)] mod L

The initial value of u_(t) ₀ where q is the average time interval (whichis scaled to 1):q≈1u _(t) ₀ =1−(1−α)^(q)

Equation set for the second exponential moving average for locallylinear trend:

${\overset{\_}{M}}_{t_{n}} = {{v_{t_{n}}\left( \frac{{\overset{\_}{X}}_{t_{n}} - {\overset{\_}{X}}_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}} \right)} + {\left( {1 - v_{t_{n}}} \right){\overset{\_}{M}}_{t_{n - 1}}}}$$v_{t_{n}} = \frac{v_{t_{n - 1}}}{v_{t_{n - 1}} + {\rho_{n}^{n - 1}b_{n}}}$b_(n) = (1 − β)^((t_(n) − t_(n − 1)))$\rho_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$

The initial value of M _(t) ₀ :

${\overset{\_}{M}}_{t_{0}} = {\frac{1}{L}\left( {\frac{{\overset{\_}{z}}_{L} - {\overset{\_}{z}}_{0}}{L} + \frac{{\overset{\_}{z}}_{L + 1} - {\overset{\_}{z}}_{1}}{L} + \ldots + \frac{{\overset{\_}{z}}_{{2L} - 1} - {\overset{\_}{z}}_{L - 1}}{L}} \right)}$

The initial value of ν_(t) ₀ where q is the average time interval (whichis scaled to 1):q≈1ν_(t) ₀ =1−(1−β)^(q)

Deseasonalized local linear forecast G _(t) _(n) provides the couplingbetween the first and second exponential moving averages:G _(t) _(n) = X _(t) _(n−1) + M _(t) _(n−1) (t _(n) −t _(n−1))

Equation set for the third exponential moving average for weekend andweekday seasonal factors are as follows.

In the weekends:

$\left. {\overset{\_}{B}}_{\tau_{n}}\leftarrow{{\gamma\frac{x_{t_{n}}}{{\overset{\_}{X}}_{t_{n}}}} + {\left( {1 - \gamma} \right){\overset{\_}{B}}_{\tau_{n}}}} \right.$τ_(n) = τ(t_(n)) = [(t_(n) − t_(12AM))div Δ_(τ)]mod  L

In the weekdays:

$\left. {\overset{\_}{C}}_{\tau_{n}}\leftarrow{{\gamma\frac{x_{t_{n}}}{{\overset{\_}{X}}_{t_{n}}}} + {\left( {1 - \gamma} \right){\overset{\_}{C}}_{\tau_{n}}}} \right.$τ_(n) = τ(t_(n)) = [(t_(n) − t_(12AM))div Δ_(τ)]mod  L

Either at the end of each season or after each update of B _(τ) _(n) orC _(τ) _(n) (the former method is more efficient and the latter may betoo compute intensive), divide each weekend factor B _(k) and weekdayfactor C _(l) by the normalization factor:

$\frac{1}{K + {5L}}\left( {{\sum\limits_{k = 0}^{K - 1}{\overset{\_}{B}}_{k}} + {5{\sum\limits_{l = 0}^{L - 1}{\overset{\_}{C}}_{l}}}} \right)$

The initial values of B _(k):

${I_{e} = {\frac{1}{N_{e}}{\sum\limits_{i = 1}^{N_{e}}x_{t_{i}}}}},{e = 0},{1\mspace{14mu}{and}}$N_(e)  is  the  number  of  samples  in  weekend  e${{\overset{\_}{y}}_{k} = {\frac{1}{N_{k}}{\sum\limits_{i = 1}^{N_{k}}x_{t_{i}}}}},{k = 0},1,\ldots\mspace{14mu},{383\mspace{14mu}{and}}$N_(k)  is  the  number  of  samples  in  interval  k  ${{\overset{\_}{B}}_{k} = {\frac{1}{2}\left( {{{\overset{\_}{y}}_{k}/I_{0}} + {{\overset{\_}{y}}_{k + 192}/I_{1}}} \right)}},{k = 0},1,\ldots\mspace{14mu},191$

The initial values of C _(l):

${J_{d} = {\frac{1}{N_{d}}{\sum\limits_{i = 1}^{N_{d}}x_{t_{i}}}}},{d = 0},1,\ldots\mspace{14mu},{4\mspace{14mu}{and}}$N_(d)  is  the  number  of  samples  on  day  d${{\overset{\_}{z}}_{l} = {\frac{1}{N_{l}}{\sum\limits_{i = 1}^{N_{l}}x_{t_{i}}}}},{l = 0},1,\ldots\mspace{14mu},{479\mspace{14mu}{and}}$N_(l)   is  the  number  of  samples  in  interval  l${{\overset{\_}{C}}_{l} = {\frac{1}{5}\left( {{{\overset{\_}{z}}_{l}/J_{0}} + {{\overset{\_}{z}}_{l + 96}/J_{1}} + {{\overset{\_}{z}}_{l + 192}/J_{2}} + {{\overset{\_}{z}}_{l + 288}/J_{3}} + {{\overset{\_}{z}}_{l + 384}/J_{4}}} \right)}},{l = 0},1,\ldots\mspace{14mu},95$

To rebalance the relative magnitudes of weekend and weekday seasonalfactors, we divide each seasonal factor B _(i) and C _(j) by the averagedaily measure:

$\frac{1}{5 + \left( {2*2} \right)}\left( {{\sum\limits_{d = 0}^{4}J_{d}} + {2*{\sum\limits_{e = 0}^{1}I_{e}}}} \right)$

Equation set for the fourth and fifth exponential moving averages foroutlier detection (Note that e_(t) _(n) is one-step forecast errorresidual, setting h=1):

${\overset{\_}{E}}_{t_{n}} = {{\psi_{t_{n}}e_{t_{n}}} + {\left( {1 - \psi_{t_{n}}} \right){\overset{\_}{E}}_{t_{n - 1}}}}$${\overset{\_}{D}}_{t_{n}} = {{\psi_{t_{n}}{e_{t_{n}}}} + {\left( {1 - \psi_{t_{n}}} \right){\overset{\_}{D}}_{t_{n - 1}}}}$$\psi_{t_{n}} = \frac{\psi_{t_{n - 1}}}{\psi_{t_{n - 1}} + d_{n}}$d_(n) = (1 − δ)^((t_(n) − t_(n − 1)))

The initial value of Ē_(t) ₀ and D _(t) ₀ is 0.

The initial value of ψ_(t) ₀ where q is the average time interval (whichis scaled to 1):q≈1ψ_(t) ₀ =1−(1−δ)^(q)

Expression for detecting the outlier when the normalized residual islarger than Q:

${{\frac{e_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}}}{{\overset{\_}{D}}_{t_{n - 1}}}} > Q},{Q > 1}$

Clipping of an outlier sample point x_(t) _(n) :

$x_{t_{n}}^{\prime} = \left\{ \begin{matrix}{{{{MIN}\left( {{{\overset{\_}{F}}_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}} + {Q\;{\overset{\_}{D}}_{t_{n - 1}}}},x_{\max}} \right)}\mspace{14mu}{when}\mspace{14mu} e_{t_{n}}} < {{MIN}\left( {{\overset{\_}{E}}_{t_{n - 1}},0} \right)}} \\{{{{MAX}\left( {{{\overset{\_}{F}}_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}} - {Q\;{\overset{\_}{D}}_{t_{n - 1}}}},x_{\min}} \right)}\mspace{14mu}{when}\mspace{14mu} e_{t_{n}}} > {{MAX}\left( {{\overset{\_}{E}}_{t_{n - 1}},0} \right)}}\end{matrix} \right.$

If the sample is an outlier, the clipped value should be used instead ofthe outlier value to update the average using one of the followingformulae depending whether the time falls in a weekend or on a weekday:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}^{\prime}}{{\overset{\_}{B}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{C}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right){\overset{\_}{G}}_{t_{n}}}}$Extended Holt-Winter Seasonal Filter Including Acceleration of Change ofMeasure

For congestion monitoring, such as memory leaks and deadlocks, thefollowing set of equations can be used (as derived in the previoussections).

The residual error series ise _(h,t) _(n) = F _(h,t) _(n) −x _(t) _(n)

The h-step forecasted measure F _(h,t) _(n) is given by:

${\overset{\_}{F}}_{h,t_{n}} = {x_{t_{n - h}} + {{\overset{\_}{R}}_{t_{\lceil{n - \frac{h}{2}}\rceil}}\left( {t_{n} - t_{n - h}} \right)}}$

To include seasonal trend in the h-step forecast F _(h,t) _(n) , thedeseasonalized measure forecast can be multiplied with the seasonalfactors B _(τ) _(n) or C _(τ) _(n) depending on whether t_(n) falls in aweekend or on a weekday:

${\overset{\_}{F}}_{h,t_{n}} = {\left\lbrack {\frac{{\overset{\_}{X}}_{t_{n - h}}}{{\overset{\_}{B}}_{\tau_{n - h} - K}} + {{\overset{\_}{R}}_{t_{\lceil{n - \frac{h}{2}}\rceil}}\left( {t_{n} - t_{n - h}} \right)}} \right\rbrack{\overset{\_}{B}}_{\tau_{n}}}$${\overset{\_}{F}}_{h,t_{n}} = {\left\lbrack {\frac{{\overset{\_}{X}}_{t_{n - h}}}{{\overset{\_}{C}}_{\tau_{n - h} - L}} + {{\overset{\_}{R}}_{t_{\lceil{n - \frac{h}{2}}\rceil}}\left( {t_{n} - t_{n - h}} \right)}} \right\rbrack{\overset{\_}{C}}_{\tau_{n}}}$

X _(t) _(n−h) is the deaseasonalized measure. Deseasonalized measure isupdated in the weekends using:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{B}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right)\left\lbrack {{\overset{\_}{X}}_{t_{n - 1}} + {{\overset{\_}{R}}_{t_{n - 1}}\left( {t_{n} - t_{n - 1}} \right)}} \right\rbrack}}$

Deseasonalized measure is updated in the weekdays using:

${\overset{\_}{X}}_{t_{n}} = {{u_{t_{n}}\frac{x_{t_{n}}}{{\overset{\_}{C}}_{\tau_{n}}}} + {\left( {1 - u_{t_{n}}} \right)\left\lbrack {{\overset{\_}{X}}_{t_{n - 1}} + {{\overset{\_}{R}}_{t_{n - 1}}\left( {t_{n} - t_{n - 1}} \right)}} \right\rbrack}}$

The deseasonalized measure filter parameters are:

$u_{t_{n}} = \frac{u_{t_{n - 1}}}{u_{t_{n - 1}} + {\rho_{n}^{n - 1}a_{n}}}$a_(n) = (1 − α)^((t_(n) − t_(n − 1)))ρ_(n)^(n − 1) = θ_(n)^(n − 1)φ_(n)^(n − 1)$\theta_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$φ_(n)^(n − 1) = 1

Other useful formulae for the factor φ_(n) ^(n−1) (depending on whetherthe measurement time interval is increasing or decreasing):

$\varphi_{n}^{n - 1} = \left\{ \begin{matrix}\left( \frac{t_{n - 2}^{\prime} - t_{n - 2}}{t_{n - 1}^{\prime} - t_{n - 1}} \right) \\\left( \frac{t_{n - 1}^{\prime} - t_{n - 1}}{t_{n - 2}^{\prime} - t_{n - 2}} \right)\end{matrix} \right.$

The initial value of X _(t) ₀ , if t₀ falls in a weekend:X _(t) ₀ = y _(τ) ₀τ₀=τ(t ₀)=[(t ₀ −t _(12 AM))div Δ_(τ)] mod K

If t₀ falls in a weekend:X _(t) ₀ = z _(τ) ₀τ₀=τ(t ₀)=[(t ₀ −t _(12 AM))div Δ_(τ)] mod L

${\overset{\_}{R}}_{t_{\lceil{n - \frac{h}{2}}\rceil}}$is the average deseasonalized growth rate within the interval [t_(n−h),t_(n)] given by:

${\overset{\_}{R}}_{t_{\lceil{n - \frac{h}{2}}\rceil}} = {{\overset{\_}{R}}_{t_{n - h}} + {{\overset{\_}{S}}_{t_{n}}\left( \frac{t_{n} - t_{n - h}}{2} \right)}}$

Raw measure is the growth rate (first derivative):

$r_{t_{n}} = \frac{x_{t_{n}} - x_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}}$

Equation set for the first exponential moving average for the measuredgrowth rate depends on the seasonal trending factors. The originalexpression without seasonal trending isR _(t) _(n=) ν_(t) _(n) r _(t) _(n) +(1−ν_(t) _(n) ) G _(t) _(n)

If two seasonal trends (for weekends and weekdays) are introduced, thenthe deseasonalized measurements can be used, depending on which seasont_(n−1) and t_(n) fall in.

${\Delta\; x_{t_{n}}} = \left\{ \begin{matrix}{\frac{x_{t_{n}}}{{\overset{\_}{B}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{B}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{fall}\mspace{14mu}{in}\mspace{14mu} a\mspace{14mu}{weekend}\mspace{14mu}{season}} \\{\frac{x_{t_{n}}}{{\overset{\_}{C}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{C}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{fall}\mspace{14mu}{in}\mspace{14mu} a\mspace{14mu}{weekday}\mspace{14mu}{season}} \\{\frac{x_{t_{n}}}{{\overset{\_}{B}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{C}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{falls}\mspace{14mu}{on}\mspace{14mu} a\mspace{14mu}{weekday}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{falls}\mspace{14mu}{in}\mspace{14mu} a\mspace{14mu}{weekend}} \\{\frac{x_{t_{n}}}{{\overset{\_}{C}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{B}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{falls}\mspace{14mu}{in}\mspace{14mu} a\mspace{14mu}{weekend}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{falls}\mspace{14mu}{on}\mspace{14mu} a\mspace{14mu}{weekday}}\end{matrix} \right.$

The deseasonalized raw growth rate is given by:

t n = Δ ⁢ ⁢ x t n t n - t n - 1 ′

The moving average is updated using:R _(t) _(n) =ν_(t) _(n) Γ_(t) _(n) +(1−ν_(t) _(n) ) G _(t) _(n)

The filter parameters are adjusted by the following formulae:

$v_{t_{n}} = \frac{v_{t_{n - 1}}}{v_{t_{n - 1}} + {\mu_{n}^{n - 1}b_{n}}}$b_(n) = (1 − β)^((t_(n) − t_(n − 1)))$\mu_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}^{\prime}}{t_{n} - t_{n - 1}^{\prime}} \right)$

If seasonal trending is not employed, the initial value of the smoothedgrowth rate is

${{\overset{\_}{R}}_{t_{0}} = \frac{x_{t_{0}} - x_{t_{- p}}}{t_{0} - t_{- p}}},{\left( {t_{0} - t_{- p}} \right) > {15\mspace{14mu}{{minutes}.}}}$

The initial value of ν_(t) ₀ where q is the average time interval (whichis scaled to 1):q≈1ν_(t) ₀ =1−(1−β)^(q)

Equation set for the second exponential moving average for accelerationof growth rate:

$s_{t_{n}} = \frac{{\overset{\_}{R}}_{t_{n}} - {\overset{\_}{R}}_{t_{n - 1}}}{t_{n} - t_{n - 1}}$${\overset{\_}{S}}_{t_{n}} = {{w_{t_{n}}s_{t_{n}}} + {\left( {1 - w_{t_{n}}} \right){\overset{\_}{S}}_{t_{n - 1}}}}$$w_{t_{n}} = \frac{w_{t_{n - 1}}}{w_{t_{n - 1}} + {\sigma_{n}^{n - 1}c_{n}}}$c_(n) = (1 − κ)^((t_(n) − t_(n − 1)))$\sigma_{n}^{n - 1} = \left( \frac{t_{n - 1} - t_{n - 2}}{t_{n} - t_{n - 1}} \right)$

If seasonal trending is not employed, the initial value of the smoothedgrowth acceleration is

${{\overset{\_}{S}}_{t_{0}} = \frac{{\overset{\_}{R}}_{t_{0}} - {\overset{\_}{R}}_{t_{- q}}}{t_{0} - t_{- q}}},{\left( {t_{0} - t_{- q}} \right) > {15\mspace{14mu}{{minutes}.}}}$

The initial value of w_(t) ₀ where q is the average time interval (whichis scaled to 1):q≈1w _(t) ₀ =1−(1−κ)^(q)

The deseasonalized forecasted rate of change based on the linear trendin rate of change:G _(t) _(n) = R _(t) _(n−1) + S _(t) _(n−1) (t _(n) −t _(n−1))

Equation set for the third exponential moving average for weekend andweekday seasonal factors are as follows.

Seasonal multiplicative factors are updated in the weekends:

$\left. {\overset{\_}{B}}_{\tau_{n}}\leftarrow{{\gamma\frac{x_{t_{n}}}{{\overset{\_}{X}}_{t_{n}}}} + {\left( {1 - \gamma} \right){\overset{\_}{B}}_{\tau_{n}}}} \right.$τ = τ(t_(n)) = [(t_(n) − t_(12AM))  div Δ_(τ)]mod  K

Seasonal multiplicative factors are updated in the weekdays:

$\left. {\overset{\_}{C}}_{\tau_{n}}\leftarrow{{\gamma\frac{x_{t_{n}}}{{\overset{\_}{X}}_{t_{n}}}} + {\left( {1 - \gamma} \right){\overset{\_}{C}}_{\tau_{n}}}} \right.$τ = τ(t_(n)) = [(t_(n) − t_(12AM))  div Δ_(τ)]mod  L

Either at the end of each season or after update of B _(τ) _(n) or C_(τ) _(n) (the former method is more efficient and the latter may be toocompute intensive), divide each weekend factor B _(k) and weekday factorC _(l) by the normalization factor:

$\frac{1}{K + {5L}}\left( {{\sum\limits_{k = 0}^{K - 1}{\overset{\_}{B}}_{k}} + {5{\sum\limits_{l = 0}^{L - 1}{\overset{\_}{C}}_{l}}}} \right)$

The initial values of B _(k):

${I_{e} = {\frac{1}{N_{e}}{\sum\limits_{i = 1}^{N_{e}}x_{t_{i}}}}},{e = 0},{1\mspace{14mu}{and}}$N_(e)  is  the  number  of  samples  in  weekend  e${{\overset{\_}{y}}_{k} = {\frac{1}{N_{k}}{\sum\limits_{i = 1}^{N_{k}}x_{t_{i}}}}},{k = 0},1,\ldots\mspace{14mu},{383\mspace{14mu}{and}}$N_(k)  is  the  number  of  samples  in  interval  k${{\overset{\_}{B}}_{k} = {\frac{1}{2}\left( {{{\overset{\_}{y}}_{k}/I_{0}} + {{\overset{\_}{y}}_{k + 192}/I_{1}}} \right)}},{k = 0},1,\ldots\mspace{14mu},191$

The initial values of C _(l):

${J_{d} = {\frac{1}{N_{d}}{\sum\limits_{i = 1}^{N_{d}}x_{t_{i}}}}},{d = 0},1,\ldots\mspace{14mu},{4\mspace{11mu}{and}}$N_(d)  is  the  number  of  samples  on  day  d${{\overset{\_}{z}}_{l} = {\frac{1}{N_{l}}{\sum\limits_{i = 1}^{N_{l}}x_{t_{i}}}}},{l = 0},1,\ldots\mspace{14mu},{479\mspace{14mu}{and}}$N_(l)  is  the  number  of  samples  in  interval  l${{\overset{\_}{C}}_{l} = {\frac{1}{5}\left( {{{\overset{\_}{z}}_{l}/J_{0}} + {{\overset{\_}{z}}_{l + 96}/J_{1}} + {{\overset{\_}{z}}_{l + 192}/J_{2}} + {{\overset{\_}{z}}_{l + 288}/J_{3}} + {{\overset{\_}{z}}_{l + 384}/J_{4}}} \right)}},{l = 0},1,\ldots\mspace{14mu},95$

To rebalance the relative magnitudes of weekend and weekday seasonalfactors, we divide each seasonal factor B _(i) and C _(j) by the averagedaily measure:

$\frac{1}{5 + \left( {2*2} \right)}\left( {{\sum\limits_{d = 0}^{4}J_{d}} + {2*{\sum\limits_{e = 0}^{1}I_{e}}}} \right)$

Equation set for the exponential moving averages for outlier detection(Note that e_(t) _(n) is one-step forecast error residual, setting h=1):

${\overset{\_}{E}}_{t_{n}} = {{\psi_{t_{n}}e_{t_{n}}} + {1\left( {- \psi_{t_{n}}} \right){\overset{\_}{E}}_{t_{n - 1}}}}$${\overset{\_}{D}}_{t_{n}} = {{\psi_{t_{n}}{e_{t_{n}}}} + {1\left( {- \psi_{t_{n}}} \right){\overset{\_}{D}}_{t_{n - 1}}}}$$\psi_{t_{n}} = \frac{\psi_{t_{n - 1}}}{\psi_{t_{n - 1}} + d_{n}}$d_(n) = (1 − δ)^((t_(n) − t_(n − 1)))

The initial value of Ē_(t) ₀ and D _(t) ₀ is 0.

The initial value of ψ_(t) ₀ where q is the average time interval (whichis scaled to 1):q≈1ψ_(t) ₀ =1−(1−δ)^(q)

Expression for detecting the outlier when the normalized residual islarger than Q:

${{\frac{e_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}}}{{\overset{\_}{D}}_{t_{n - 1}}}} > Q},{Q > 1}$

Clipping of an outlier sample point x_(t) _(n) :

$x_{t_{n}}^{\prime}:=\left\{ \begin{matrix}{{MIN}\left( {{\overset{\_}{F}}_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}} + {Q\;{\overset{\_}{D}}_{t_{n - 1},x_{\max}}}} \right)} & {when} & {e_{t_{n}} < {{MIN}\left( {{\overset{\_}{E}}_{t_{n - 1}},0} \right)}} \\{{MAX}\left( {{\overset{\_}{F}}_{t_{n}} - {\overset{\_}{E}}_{t_{n - 1}} - {Q\;{\overset{\_}{D}}_{t_{n - 1},x_{\min}}}} \right)} & {when} & {e_{t_{n}} > {{MAX}\left( {{\overset{\_}{E}}_{t_{n - 1}},0} \right)}}\end{matrix} \right.$

If the current sample is clipped, the rate should be recalculated:

$r_{t_{n}}^{\prime} = \left\{ \begin{matrix}r_{t_{n}} & {{not}\mspace{14mu}{an}\mspace{14mu}{outlier}} \\\frac{x_{t_{n}}^{\prime} - x_{t_{n - 1}}}{t_{n} - t_{n - 1}^{\prime}} & {{{an}\mspace{14mu}{outlier}}\;}\end{matrix} \right.$

The value r′_(t) _(n) should be used to update the average, if seasonaltrending is not employed:R _(t) _(n) =ν_(t) _(n) r′ _(t) _(n) +(1−ν_(t) _(n) ) G _(t) _(n)

If seasonal trending is employed, use one of the following formulaedepending on whether the times fall in a weekend or on a weekday:

${\Delta\; x_{t_{n}}^{\prime}} = \left\{ \begin{matrix}{\frac{x_{t_{n}}^{\prime}}{{\overset{\_}{B}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{B}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{fall}\mspace{14mu}{in}{\mspace{11mu}\;}{the}\mspace{14mu}{weekend}\mspace{14mu}{season}} \\{\frac{x_{t_{n}}^{\prime}}{{\overset{\_}{C}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{C}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{fall}\mspace{14mu}{in}\mspace{14mu}{the}\mspace{14mu}{weekday}\mspace{14mu}{season}} \\{\frac{x_{t_{n}}^{\prime}}{{\overset{\_}{B}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{C}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{falls}\mspace{14mu}{on}\mspace{14mu} a\mspace{14mu}{weekday}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{falls}\mspace{14mu}{in}\mspace{14mu} a\mspace{14mu}{weekend}} \\{\frac{x_{t_{n}}^{\prime}}{{\overset{\_}{C}}_{\tau_{n}}} - \frac{x_{t_{n - 1}}}{{\overset{\_}{B}}_{\tau_{n - 1}}}} & {t_{n - 1}\mspace{14mu}{falls}\mspace{14mu}{in}\mspace{14mu} a\mspace{14mu}{weekend}\mspace{14mu}{and}\mspace{14mu} t_{n}\mspace{14mu}{falls}\mspace{14mu}{on}\mspace{14mu} a\mspace{14mu}{weekday}}\end{matrix} \right.$

The deseasonalized raw growth rate is given by:

t n ′ = Δ ⁢ ⁢ x t n ′ t n - t n - 1 ′

The moving average is updated using:R _(t) _(n) =ν_(t) _(n)

+(1−ν_(t) _(n) ) G _(t) _(n)Hardware Overview

FIG. 10 is a simplified block diagram illustrating components of asystem environment 1000 that may be used in accordance with anembodiment of the present invention. As shown, system environment 1000includes one or more client computing devices 1002, 1004, 1006, 1008,which are configured to operate client applications including nativeclient applications and possibly other applications such as a webbrowser, or the like. In various embodiments, client computing devices1002, 1004, 1006, and 1008 may interact with a server 1012.

Client computing devices 1002, 1004, 1006, 1008 may be general purposepersonal computers (including, by way of example, personal computersand/or laptop computers running various versions of Microsoft Windowsand/or Apple Macintosh operating systems), cell phones or PDAs (runningsoftware such as Microsoft Windows Mobile and being Internet, e-mail,SMS, Blackberry, or other communication protocol enabled), and/orworkstation computers running any of a variety of commercially-availableUNIX or UNIX-like operating systems (including without limitation thevariety of GNU/Linux operating systems). Alternatively, client computingdevices 1002, 1004, 1006, and 1008 may be any other electronic device,such as a thin-client computer, Internet-enabled gaming system, and/orpersonal messaging device, capable of communicating over a network(e.g., network 1010 described below). Although exemplary systemenvironment 1000 is shown with four client computing devices, any numberof client computing devices may be supported. Other devices such asdevices with sensors, etc. may interact with server 1012.

System environment 1000 may include a network 1010. Network 1010 may beany type of network familiar to those skilled in the art that cansupport data communications using any of a variety ofcommercially-available protocols, including without limitation TCP/IP,SNA, IPX, AppleTalk, and the like. Merely by way of example, network1010 can be a local area network (LAN), such as an Ethernet network, aToken-Ring network and/or the like; a wide-area network; a virtualnetwork, including without limitation a virtual private network (VPN);the Internet; an intranet; an extranet; a public switched telephonenetwork (PSTN); an infra-red network; a wireless network (e.g., anetwork operating under any of the IEEE 802.11 suite of protocols, theBluetooth protocol known in the art, and/or any other wirelessprotocol); and/or any combination of these and/or other networks.

System environment 1000 also includes one or more server computers 1012which may be general purpose computers, specialized server computers(including, by way of example, PC servers, UNIX servers, mid-rangeservers, mainframe computers, rack-mounted servers, etc.), server farms,server clusters, or any other appropriate arrangement and/orcombination. In various embodiments, server 1012 may be adapted to runone or more services or software applications.

Server 1012 may run an operating system including any of those discussedabove, as well as any commercially available server operating system.Server 1012 may also run any of a variety of additional serverapplications and/or mid-tier applications, including HTTP servers, FTPservers, CGI servers, JAVA servers, database servers, and the like.Exemplary database servers include without limitation those commerciallyavailable from Oracle, Microsoft, Sybase, IBM and the like.

System environment 1000 may also include one or more databases 1014,1016. Databases 1014, 1016 may reside in a variety of locations. By wayof example, one or more of databases 1014, 1016 may reside on anon-transitory storage medium local to (and/or resident in) server 1012.Alternatively, databases 1014, 1016 may be remote from server 1012, andin communication with server 1012 via a network-based or dedicatedconnection. In one set of embodiments, databases 1014, 1016 may residein a storage-area network (SAN) familiar to those skilled in the art.Similarly, any necessary files for performing the functions attributedto server 1012 may be stored locally on server 1012 and/or remotely, asappropriate. In one set of embodiments, databases 1014, 1016 may includerelational databases, such as databases provided by Oracle, which areadapted to store, update, and retrieve data in response to SQL-formattedcommands.

FIG. 11 is a simplified block diagram of a computer system 1100 that maybe used in accordance with embodiments of the present invention. Forexample server 1012 or clients 1002, 1004, 1006, or 1008 may beimplemented using a system such as system 1100. Computer system 1100 isshown comprising hardware elements that may be electrically coupled viaa bus 1124. The hardware elements may include one or more centralprocessing units (CPUs) 1102, one or more input devices 1104 (e.g., amouse, a keyboard, etc.), and one or more output devices 1106 (e.g., adisplay device, a printer, etc.). Computer system 1100 may also includeone or more storage devices 1108. By way of example, the storagedevice(s) 1108 may include devices such as disk drives, optical storagedevices, and solid-state storage devices such as a random access memory(RAM) and/or a read-only memory (ROM), which can be programmable,flash-updateable and/or the like.

Computer system 1100 may additionally include a computer-readablestorage media reader 1112, a communications subsystem 1114 (e.g., amodem, a network card (wireless or wired), an infra-red communicationdevice, etc.), and working memory 1118, which may include RAM and ROMdevices as described above. In some embodiments, computer system 1100may also include a processing acceleration unit 1116, which can includea digital signal processor (DSP), a special-purpose processor, and/orthe like.

Computer-readable storage media reader 1112 can further be connected toa computer-readable storage medium 1110, together (and, optionally, incombination with storage device(s) 1108) comprehensively representingremote, local, fixed, and/or removable storage devices plus storagemedia for temporarily and/or more permanently containingcomputer-readable information. Communications system 1114 may permitdata to be exchanged with network 1010 and/or any other computerdescribed above with respect to system environment 1000.

Computer system 1100 may also comprise software elements, shown as beingcurrently located within working memory 1118, including an operatingsystem 1120 and/or other code 1122, such as an application program(which may be a client application, Web browser, mid-tier application,RDBMS, etc.). In an exemplary embodiment, working memory 1118 mayinclude executable code and associated data structures used for trendforecasting as described above. It should be appreciated thatalternative embodiments of computer system 1100 may have numerousvariations from that described above. For example, customized hardwaremight also be used and/or particular elements might be implemented inhardware, software (including portable software, such as applets), orboth. Further, connection to other computing devices such as networkinput/output devices may be employed.

Storage media and computer readable media for containing code, orportions of code, can include any appropriate media known or used in theart, including storage media and communication media, such as but notlimited to volatile and non-volatile (non-transitory), removable andnon-removable media implemented in any method or technology for storageand/or transmission of information such as computer readableinstructions, data structures, program modules, or other data, includingRAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM,digital versatile disk (DVD) or other optical storage, magneticcassettes, magnetic tape, magnetic disk storage or other magneticstorage devices, data signals, data transmissions, or any other mediumwhich can be used to store or transmit the desired information and whichcan be accessed by a computer.

Although specific embodiments of the invention have been described,various modifications, alterations, alternative constructions, andequivalents are also encompassed within the scope of the invention.Embodiments of the present invention are not restricted to operationwithin certain specific data processing environments, but are free tooperate within a plurality of data processing environments.Additionally, although embodiments of the present invention have beendescribed using a particular series of transactions and steps, it shouldbe apparent to those skilled in the art that the scope of the presentinvention is not limited to the described series of transactions andsteps.

Further, while embodiments of the present invention have been describedusing a particular combination of hardware and software, it should berecognized that other combinations of hardware and software are alsowithin the scope of the present invention. Embodiments of the presentinvention may be implemented only in hardware, or only in software, orusing combinations thereof.

The specification and drawings are, accordingly, to be regarded in anillustrative rather than a restrictive sense. It will, however, beevident that additions, subtractions, deletions, and other modificationsand changes may be made thereunto without departing from the broaderspirit and scope.

What is claimed is:
 1. A computer-implemented method comprising: identifying a first partition of data with a fact category, a second partition of data with an information category, a third partition of data with a hypothesis category, and a fourth partition of data with a directive category; identifying a first partition of transformative actions with a classification category, a second partition of transformative actions with an assessment category, a third partition of transformative actions with a resolution category, and a fourth partition of transformative actions with an enactment category; invoking a first action to produce a second set of data from the information category; invoking a second action to produce a third set of data from the hypothesis category; invoking a third action to produce a fourth set of data from the directive category; invoking a fourth action to produce a fifth set of data from the fact category; invoking a classification action on a first set of facts to produce a first set of information; invoking an assessment action on the first set of information to produce a first set of hypotheses; invoking a resolution action on the first set of hypotheses to produce a first set of directives; invoking an enactment action on the first set of directives to modify system behavior and to produce a second set of facts that differs from the first set of facts; invoking the classification action on the second set of facts to produce a second set of information that differs from the first set of information; invoking the assessment action on the second set of information to produce a second set of hypotheses that differs from the first set of hypotheses; invoking the resolution action on the second set of hypotheses to produce a second set of directives that differs from the first set of directives; and invoking the enactment action on the second set of directives to modify system behavior and to produce a third set of facts that differs from the first and second set of facts; wherein the method is performed by one or more computing processors.
 2. The method of claim 1, wherein the first set of information specifies at least an observation, a prediction, a norm, an objective.
 3. The method of claim 2, further comprising: inferring influence of any new set of data from the fact category on a first action from the classification category; invoking the first action to produce a second new set of data from the information category, the second new set of data including an objective; determining whether the second new set of data including the objective satisfies a condition; and iterating the foregoing operations until the second new set of data including the objective satisfies the condition.
 4. The method of claim 2, wherein: classifying a set of fact is performed based at least in part on a feature object that relates a value, a valid time, a figure of merit, an entity, and a feature type; assessing a set of information is performed based at least in part on a feature object that relates a value, a valid time, a figure of merit, an entity, and a feature type; resolving a set of fact, information, or hypothesis is performed based at least in part on a feature object that relates a value, a valid time, a figure of merit, an entity, and a feature type; and enacting a set of directive is performed based at least in part on a feature object that relates a value, a valid time, a figure of merit, an entity, and a feature type.
 5. The method of claim 4, wherein the valid time is a time interval indicating an interval of time during which the feature object is valid.
 6. The method of claim 4, wherein the figure of merit represents at least one of a confidence level, a confidence interval, a probability, or a root mean square error.
 7. The method of claim 4, wherein the observation relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 8. The method of claim 4, wherein the prediction relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 9. The method of claim 4, wherein the norm relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 10. The method of claim 4, wherein the objective relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 11. The method of claim 4, wherein the first set of hypotheses relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 12. The method of claim 4, wherein the first set of directives relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 13. The method of claim 4, wherein the classifying comprises applying a set of functions that maps a tuple of feature vectors to at least one of an observation, a prediction, a norm, or an objective; wherein the observation relates a feature vector, the valid time, and the figure of merit; wherein the prediction relates a feature vector, the valid time, and the figure of merit; wherein the norm relates a feature vector, the valid time, and the figure of merit; wherein the objective relates a feature vector, the valid time, and the figure of merit; and wherein the feature vector is a vector that includes the feature object.
 14. The method of claim 4, further comprising: identifying a set of feature vectors; maintaining a separate valid time for each feature vector in the set of feature vectors; maintaining a separate transaction time for reification of relations recording information changes; identifying a state transition event based on an enactment of a directive; assigning a valid time to the state transition; assigning a transaction time to a reification of an enactment of a directive on an entity; and applying a bi-temporal calculus based at least in part on provenance information specified by the relations.
 15. A computer-implemented method comprising: identifying a first partition of data with a fact category, a second partition of data with an information category, a third partition of data with a hypothesis category, and a fourth partition of data with a directive category; identifying a first partition of transformative actions with a classification category, a second partition of transformative actions with an assessment category, a third partition of transformative actions with a resolution category, and a fourth partition of transformative actions with an enactment category; invoking a first action to produce a second set of data from the information category; invoking a second action to produce a third set of data from the hypothesis category; invoking a third action to produce a fourth set of data from the directive category; invoking a fourth action to produce a fifth set of data from the fact category; invoking a classification action on a first set of facts to produce a first set of information; invoking an assessment action on the first set of information to produce a first set of hypotheses; invoking a resolution action on the first set of hypotheses to produce a first set of directives; invoking an enactment action on the first set of directives to modify system behavior and to produce a second set of facts that differs from the first set of facts; wherein invoking the classification action comprises applying a set of functions that maps a particular feature vector to an observation, a prediction, a norm, or an objective in the first set of information; and wherein the particular feature vector is a vector that includes a feature object.
 16. The method of claim 15, wherein invoking the assessment action comprises applying a set of functions that maps a second particular feature vector to a hypothesis in the first set of hypotheses; and wherein the second particular feature vector is a vector that includes the feature object.
 17. The method of claim 15, wherein invoking the resolution action comprises applying a set of functions that maps a second particular feature vector to a particular directive in the first set of directives; and wherein the second particular feature vector is a vector that includes the feature object.
 18. The method of claim 15, wherein invoking the enactment action comprises applying a set of functions that maps a second particular feature vector to a particular fact in the second set of facts; and wherein the second particular feature vector is a vector that includes the feature object.
 19. The method of claim 15, further comprising: applying a profile vector for a particular actor to a classification function on which the classification action is based; applying the profile vector for the particular actor to an assessment function on which the assessment action is based; applying the profile vector for the particular actor to a resolution function on which the resolution action is based; applying the profile vector for the particular actor to an enactment function on which the enactment action is based; wherein the profile vector includes values derived from tacit knowledge, a social network, and specified preferences.
 20. The method of claim 15, further comprising: matching a first profile vector for a particular actor to a second profile vector to select the particular actor from a plurality of actors to perform at least one of the classification action, the assessment action, the resolution action, or the enactment action; wherein the first profile vector is computed based at least in part on tacit knowledge, a social network, and specified preferences; wherein the second profile vector is computed based at least in part on functions that map classifications, assessments, resolutions, and enactments to the second profile vector.
 21. The system of claim 15, the storage medium storing further instructions which, when executed by the one or more processors, cause the processors to perform operations comprising: matching a first profile vector for a particular actor to a second profile vector to select the particular actor from a plurality of actors to perform at least one of the classification action, the assessment action, the resolution action, or the enactment action; wherein the first profile vector is computed based at least in part on tacit knowledge, a social network, and specified preferences; wherein the second profile vector is computed based at least in part on functions that map classifications, assessments, resolutions, and enactments to the second profile vector.
 22. A system comprising: one or more processors; and a storage medium storing instructions which, when executed by the one or more processors, cause the processors to perform operations comprising: identifying a first partition of data with a fact category, a second partition of data with an information category, a third partition of data with a hypothesis category, and a fourth partition of data with a directive category; identifying a first partition of transformative actions with a classification category, a second partition of transformative actions with an assessment category, a third partition of transformative actions with a resolution category, and a fourth partition of transformative actions with an enactment category; invoking a first action to produce a second set of data from the information category; invoking a second action to produce a third set of data from the hypothesis category; invoking a third action to produce a fourth set of data from the directive category; invoking a fourth action to produce a fifth set of data from the fact category; invoking a classification action on a first set of facts to produce a first set of information; invoking an assessment action on the first set of information to produce a first set of hypothesis; invoking a resolution action on the first set of hypothesis to produce a first set of directives; and invoking an enactment action on the first set of directives to modify system behavior and to produce a second set of facts that differs from the first set of facts; wherein invoking the classification action comprises applying a set of functions that maps a particular feature vector to an observation, a prediction, a norm, or an objective in the first set of information; and wherein the particular feature vector is a vector that includes a feature object.
 23. The system of claim 22, wherein invoking the assessment action comprises applying a set of functions that maps a second particular feature vector to a hypothesis in the first set of hypotheses; and wherein the second particular feature vector is a vector that includes the feature object.
 24. The system of claim 22, wherein invoking the resolution action comprises applying a set of functions that maps a second particular feature vector to a particular directive in the first set of directives; and wherein the second particular feature vector is a vector that includes the feature object.
 25. The system of claim 22, wherein invoking the enactment action comprises applying a set of functions that maps a second particular feature vector to a particular fact in the second set of facts; and wherein the second particular feature vector is a vector that includes the feature object.
 26. The system of claim 22, the storage medium storing further instructions which, when executed by the one or more processors, cause the processors to perform operations comprising: applying a profile vector for a particular actor to a classification function on which the classification action is based; applying the profile vector for the particular actor to an assessment function on which the assessment action is based; applying the profile vector for the particular actor to a resolution function on which the resolution action is based; applying the profile vector for the particular actor to an enactment function on which the enactment action is based; wherein the profile vector includes values derived from tacit knowledge, a social network, and specified preferences. 